Table of Contents

Class ApiException

Namespace
Auth0.Core.Exceptions
Assembly
Auth0.Core.dll

Represents an exception that occurs when making API calls.

[Serializable]
public abstract class ApiException : Exception, ISerializable
Inheritance
ApiException
Implements
Derived
Inherited Members

Constructors

ApiException()

Initializes a new instance of the ErrorApiException class.

protected ApiException()

ApiException(SerializationInfo, StreamingContext)

protected ApiException(SerializationInfo serializationInfo, StreamingContext streamingContext)

Parameters

serializationInfo SerializationInfo
streamingContext StreamingContext

ApiException(string)

Initializes a new instance of the ApiException class with a specified error message.

protected ApiException(string message)

Parameters

message string

The error message that explains the reason for the exception.

ApiException(string, Exception)

Initializes a new instance of the ApiException class with a specified error message and a reference to the inner exception that is the cause of this exception.

protected ApiException(string message, Exception innerException)

Parameters

message string

The error message that explains the reason for the exception.

innerException Exception

The exception that is the cause of the current exception, or a null reference if no inner exception is specified.

Methods

CreateSpecificExceptionAsync(HttpResponseMessage)

Create an instance of the specific exception required for this unsuccessful HttpResponseMessage.

public static Task<ApiException> CreateSpecificExceptionAsync(HttpResponseMessage response)

Parameters

response HttpResponseMessage

HttpResponseMessage to parse for the correct exception.

Returns

Task<ApiException>

An instance of a ApiException subclass containing the appropriate exception for this response.