IotHubCommunicationException Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This exception is thrown when an attempt to communicate with the IoT hub service fails due to transient network errors after exhausting all the retries based on the retry policy set on the client or due to operation timeouts.
[System.Serializable]
public sealed class IotHubCommunicationException : Microsoft.Azure.Devices.Client.Exceptions.IotHubException
[<System.Serializable>]
type IotHubCommunicationException = class
inherit IotHubException
Public NotInheritable Class IotHubCommunicationException
Inherits IotHubException
- Inheritance
- Attributes
Remarks
By default, the SDK indefinitely retries dropped connections, unless the retry policy is overridden. For more information on the SDK's retry policy and how to override it, see https://github.com/Azure/azure-iot-sdk-csharp/blob/main/iothub/device/devdoc/retrypolicy.md. When the exception is thrown due to operation timeouts, the inner exception will have OperationCanceledException. Retrying operations failed due to timeouts could resolve the error.
Constructors
IotHubCommunicationException() |
Initializes a new instance of the class. |
IotHubCommunicationException(String) |
Initializes a new instance of the class with the message string set to the message parameter. |
IotHubCommunicationException(String, Exception) |
Initializes a new instance of the class with the message string set to the message parameter and a reference to the inner exception that is the cause of this exception. |
Properties
IsTransient |
Indicates if the error is transient and should be retried. (Inherited from IotHubException) |
TrackingId |
The service returned tracking Id associated with this particular error. (Inherited from IotHubException) |
Methods
GetObjectData(SerializationInfo, StreamingContext) |
Sets the SerializationInfo with information about the exception. Use this to set IsTransient and TrackingId to the serialized object data. (Inherited from IotHubException) |
Applies to
Azure SDK for .NET