lf-api-client-core-dotnet  1.3.7
Loading...
Searching...
No Matches
ApiException Class Reference

Represents errors that occur from error API responses. More...

Inheritance diagram for ApiException:

Public Member Functions

 ApiException (string message, int statusCode, IReadOnlyDictionary< string, IEnumerable< string > > headers, ProblemDetails problemDetails, Exception innerException)
 

Static Public Member Functions

static ApiException Create (IEnumerable< ProblemDetails > problemDetailsToConvert)
 Create an ApiException.
 
static ApiException Create (int statusCode, IReadOnlyDictionary< string, IEnumerable< string > > headers, Exception innerException)
 Create an ApiException.
 
static ApiException Create (int statusCode, IReadOnlyDictionary< string, IEnumerable< string > > headers, ProblemDetails problemDetails, Exception innerException)
 Create an ApiException with a Client.ProblemDetails.
 
static ApiException Create (int statusCode, IReadOnlyDictionary< string, IEnumerable< string > > headers, string response, JsonSerializerSettings jsonSerializerSettings, Exception innerException)
 Create an ApiException. Will try to deserialize the response to a Client.ProblemDetails.
 

Properties

IReadOnlyDictionary< string, IEnumerable< string > > Headers [get]
 The API response headers.
 
ProblemDetails ProblemDetails [get]
 The API error details.
 
int StatusCode [get]
 The API status code.
 

Detailed Description

Represents errors that occur from error API responses.

Member Function Documentation

◆ Create() [1/4]

static ApiException Create ( IEnumerable< ProblemDetails problemDetailsToConvert)
inlinestatic

Create an ApiException.

Returns
ApiException

◆ Create() [2/4]

static ApiException Create ( int  statusCode,
IReadOnlyDictionary< string, IEnumerable< string > >  headers,
Exception  innerException 
)
inlinestatic

Create an ApiException.

Parameters
statusCodeThe response status code.
headersThe response headers.
innerExceptionThe inner exception.
Returns
ApiException

◆ Create() [3/4]

static ApiException Create ( int  statusCode,
IReadOnlyDictionary< string, IEnumerable< string > >  headers,
ProblemDetails  problemDetails,
Exception  innerException 
)
inlinestatic

Create an ApiException with a Client.ProblemDetails.

Parameters
statusCodeThe response status code.
headersThe response headers.
problemDetailsThe Client.ProblemDetails response.
innerExceptionThe inner exception.
Returns
ApiException

◆ Create() [4/4]

static ApiException Create ( int  statusCode,
IReadOnlyDictionary< string, IEnumerable< string > >  headers,
string  response,
JsonSerializerSettings  jsonSerializerSettings,
Exception  innerException 
)
inlinestatic

Create an ApiException. Will try to deserialize the response to a Client.ProblemDetails.

Parameters
statusCodeThe response status code.
headersThe response headers.
responseThe response body.
jsonSerializerSettingsThe json serializer settings used to deserialize the response.
innerExceptionThe inner exception.
Returns
ApiException

The documentation for this class was generated from the following file: