iotcs.exception module

exception iotcs.exception.ArgumentException(*args, **kwargs)

Bases: ValueError

This exception is raised if a method receives an invalid argument.

exception iotcs.exception.HttpException

Bases: Exception

This exception is raised if an HTTPError or HTTTPWarning occurs.

exception iotcs.exception.NetworkException(*args, **kwargs)

Bases: Exception

This exception is raised if an IoT REST API request fails.

exception iotcs.exception.SecurityException(*args, **kwargs)

Bases: Exception

This exception is raised if credentials failure.

exception iotcs.exception.SocketException

Bases: Exception

This exception is raised if a socket error occurs.

exception iotcs.exception.SocketTimeoutException

Bases: Exception

This exception is raised if a socket timeout error occurs.

exception iotcs.exception.StateException(*args, **kwargs)

Bases: Exception

This exception is raised if an object is in an inconsistent state.

exception iotcs.exception.TransportException(status=None, message=None, method=None, path=None, httpresponse=None, *args, **kwargs)

Bases: Exception

This exception is raised if an HTTP error occurs.

Parameters:
  • statuscode – The HTTP error status code
  • message
  • method
  • path
  • httpresponse
  • args
  • kwargs
data
getMessage()
getResponseData()
getResponseHeader(header)
getStatusCode()

Return the HTTP error status code causing this exception.

Returns:The HTTP error status code causing this exception
headers
message
method
path
statuscode