Table of Contents

Class ApiError

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

Error information captured from a failed API request.

[JsonConverter(typeof(ApiErrorConverter))]
public class ApiError
Inheritance
ApiError
Inherited Members

Properties

Error

Description of the failing HTTP Status Code.

[JsonProperty("error")]
public string Error { get; set; }

Property Value

string

ErrorCode

Error code returned by the API.

[JsonProperty("errorCode")]
public string ErrorCode { get; set; }

Property Value

string

ExtraData

Additional key/values that might be returned by the error such as mfa_required.

[JsonProperty("extraData")]
public Dictionary<string, string> ExtraData { get; set; }

Property Value

Dictionary<string, string>

Message

Description of the error.

[JsonProperty("message")]
public string Message { get; set; }

Property Value

string

Methods

Parse(HttpResponseMessage)

Parse a HttpResponseMessage into an ApiError asynchronously.

public static Task<ApiError> Parse(HttpResponseMessage response)

Parameters

response HttpResponseMessage

HttpResponseMessage to parse.

Returns

Task<ApiError>

Task representing the operation and associated ApiError on successful completion.