The chat responses are generated using Generative AI technology for intuitive search and may not be entirely accurate. They are not intended as professional advice. For full details, including our use rights, privacy practices and potential export control restrictions, please refer to our Generative AI Service Terms of Use and Generative AI Service Privacy Information. As this is a test version, please let us know if something irritating comes up. Like you get recommended a chocolate fudge ice cream instead of an energy managing application. If that occurs, please use the feedback button in our contact form!
Skip to content
Insights Hub and Industrial IoT

Insights Hub drives smart manufacturing through the industrial Internet of Things. Gain actionable insights with asset and operational data and improve your processes.

Industrial IoT SDK for Python - Error Handling¶

Understanding how and when the Industrial IoT SDK for Python throws errors is important to build high-quality applications using the SDK. The following sections describe the different scenarios in which errors are thrown by the SDK and how to handle them appropriately.

MindsphereError¶

MindsphereError is the most common error that you'll experience when using the Industrial IoT SDK for Python. This error represents an error response from a Industrial IoT service.

MindsphereError provides you with information such as:

  • Returned HTTP status
  • Returned error details
  • Detailed error message from the service
  • Reference to the occurred error

Structure of MindsphereError¶

NameDescription
messageError message
errorError code (if returned by API)
http_statusHTTP status
log_refLogger reference (if returned by API)

Subclasses of MindsphereError¶

SubclassParentDescription
MindsphereServerErrorMindsphereErrorIndicates an error at the API endpoint. For example, if user tries to call an API with invalid values for mandatory parameters.
MindsphereClientErrorMindsphereErrorIndicates an error due to missing parameter values in a request. For example, if user tries to call an API with NULL values for mandatory parameters.
MindsphereClientConfigurationErrorMindsphereClientErrorIndicates an error due to incorrect configuration parameters. For example, if a developer sets an incorrect value for the proxy or proxy port.
MindsphereForbiddenAccessErrorMindsphereClientErrorIndicates that no valid token can be retrieved with the provided credentials.