Class ManagementApiException
- Namespace
- Auth0.ManagementApi
- Assembly
- Auth0.ManagementApi.dll
This exception type will be thrown for any non-2XX API responses.
public class ManagementApiException : ManagementException, ISerializable, _Exception
- Inheritance
-
ManagementApiException
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
ManagementApiException(string, int, object, Exception?, RawResponse?)
This exception type will be thrown for any non-2XX API responses.
public ManagementApiException(string message, int statusCode, object body, Exception? innerException = null, RawResponse? rawResponse = null)
Parameters
messagestringstatusCodeintbodyobjectinnerExceptionExceptionrawResponseRawResponse
Properties
ApiError
Structured error information extracted from the response Body, if the API returned a
recognizable error payload. Returns null when no error information could be parsed.
public ApiError? ApiError { get; }
Property Value
Body
The body of the response that triggered the exception.
public object Body { get; }
Property Value
Description
The human-readable error description returned by the API, if available.
public string? Description { get; }
Property Value
ErrorCode
The machine-readable error code returned by the API, if available.
public string? ErrorCode { get; }
Property Value
Message
The error message. When the API returned a recognizable error description it is surfaced here; otherwise falls back to the default message supplied by the SDK.
public override string Message { get; }
Property Value
RateLimit
Rate limit information parsed from the response headers (x-ratelimit-limit,
x-ratelimit-remaining, x-ratelimit-reset, retry-after), along with any
client and organization quota headers. Returns null when no raw response is available.
public RateLimit? RateLimit { get; }
Property Value
RawResponse
The raw HTTP response (status code, URL, headers) that triggered the exception, if available.
public RawResponse? RawResponse { get; }
Property Value
StatusCode
The error code of the response that triggered the exception.
public int StatusCode { get; }
Property Value
Methods
ToString()
Creates and returns a string representation of the current exception.
public override string ToString()
Returns
- string
A string representation of the current exception.