IotHubServiceException Class

Definition

The exception thrown when the client receives an error while communicating with IoT hub service.

[System.Serializable]
public class IotHubServiceException : Exception
[<System.Serializable>]
type IotHubServiceException = class
    inherit Exception
Public Class IotHubServiceException
Inherits Exception
Inheritance
IotHubServiceException
Attributes

Constructors

IotHubServiceException(String, Exception)

Creates an instance of this class with the specified error message and optional inner exception.

IotHubServiceException(String, HttpStatusCode, IotHubServiceErrorCode, String, Exception)

Creates an instance of this class with HttpStatusCode, IotHubServiceErrorCode, error message, a flag indicating if the error was transient, an optional tracking id and an optional reference to the inner exception that caused this exception.

Properties

ErrorCode

The specific error code in the IoT hub service response, if available.

IsTransient

Indicates if the error is transient and should be retried.

StatusCode

The status code returned back in the IoT hub service response.

TrackingId

The service returned tracking Id associated with this particular error.

Methods

GetObjectData(SerializationInfo, StreamingContext)

Sets the SerializationInfo with information about the exception. Use this to set IsTransient and TrackingId to the serialized object data.

Applies to