Unified Communications Managed API version 1.0 follows the standard .NET Framework exception model for reporting exceptions. Both the standard exception classes in the .NET Framework and custom exception classes specific to Unified Communications Managed API version 1.0 are used.
Standard .NET Framework Exception Classes
The following is a list of some standard exception classes adopted by Unified Communications Managed API version 1.0.
- ArgumentException
-
Thrown when an invalid argument is passed to a method call or an invalid value is set on a property.
- ArgumentNullException
-
Thrown when a null argument value is passed as a parameter that cannot be null.
- ArgumentOutOfRangeException
-
Thrown when a parameter passed to a method call is not within the required range.
- InvalidOperationException
-
Thrown when the current object state is not valid for a particular action. For example, a user tried to send a message on a terminated IM session.
Unified Communications Managed API version 1.0-Specific Exception Classes
The following is the list of custom exception classes implemented in Unified Communications Managed API version 1.0.
- RealTimeException
-
This is the root class for the Unified Communications Managed API version 1.0-specific exceptions. It is thrown when the error condition cannot be mapped to any other exception types.
- ConnectionFailureException
-
Thrown when a connectivity-related error occurred on an existing socket connection, or a listening socket could not be opened.
- TlsFailureException
-
Thrown when an error occurred during a TLS handshake. This error can occur when the remote server certificate is rejected. This can also occur when the MTLS local certificate is rejected by the remote server.
- MessageParsingException
-
Thrown when an incoming response or message could not be parsed. For example, an invalid custom signaling header was used.
- MultipartContentException
-
Thrown when an error occurs during multipart body parsing.
- OperationTimeoutException
-
Thrown when an operation could not be completed in a given reasonable time. For example, a response from another endpoint or server was not received after a request was sent.
- FailureResponseException
-
Thrown when a 4xx, 5xx, or 6xx response was received for a request. This exception contains the ResponseData property containing the complete response including response code, reason text, headers, and message body. In some rare cases, this may also be thrown when an error other than a 4xx or 5xx response occurred. In such cases the ResponseData property would be null.
- PublishSubscribeException
-
Thrown when a FailureResponseException occurred for requests of the SERVICE and SUBSCRIBE types. This class inherits from FailureResponseException and adds diagnostic information about the message body and the fault code parsed from the body.
- RegisterException
-
Thrown by Register or Unregister method when an error occurred in a registration-related operation.
- AuthenticationException
-
Thrown when a 401 response was received in authentication. It exposes the failed response data (ResponseData) and parsed values of authentication-specific headers.
The following is the object model of the Unified Communications Managed API version 1.0-specific exception classes.