C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
AnalyzeRe.APIRequestException Class Reference

A custom exception class that includes the RestSharp.IRestResponse that generated the exception, and the detailed ServerError returned, if available. More...

Public Member Functions

 APIRequestException (string message, Exception innerException=null, IRestResponse restResponse=null, ServerError serverError=null)
 Construct a new APIRequestException.
 
override string ToString ()
 Creates and returns a string representation of the current exception that includes a summary of the RestResponse and ServerError if available.
 

Properties

IRestRequest Request [get]
 The original request object (obtained via the IRestResponse.Request property)
 
IRestResponse RestResponse [get, set]
 The IRestResponse that generated this exception.
 
ServerError ServerError [get, set]
 The ServerError object parsed from the response body, if available.
 

Detailed Description

A custom exception class that includes the RestSharp.IRestResponse that generated the exception, and the detailed ServerError returned, if available.

APIRequestException does not need to be Serializable

Definition at line 16 of file APIRequestException.cs.

Inheritance diagram for AnalyzeRe.APIRequestException:

Constructor & Destructor Documentation

◆ APIRequestException()

AnalyzeRe.APIRequestException.APIRequestException ( string  message,
Exception  innerException = null,
IRestResponse  restResponse = null,
ServerError  serverError = null 
)
inline

Construct a new APIRequestException.

Parameters
messageThe message that describes the error.
innerException(Optional) The exception that is the cause of the current exception.
restResponseThe IRestResponse that generated this exception.
serverErrorThe ServerError object parsed from the response body, if available.

Definition at line 37 of file APIRequestException.cs.

Member Function Documentation

◆ ToString()

override string AnalyzeRe.APIRequestException.ToString ( )
inline

Creates and returns a string representation of the current exception that includes a summary of the RestResponse and ServerError if available.

Returns
A string representation of the current exception.

Definition at line 51 of file APIRequestException.cs.

Property Documentation

◆ Request

IRestRequest AnalyzeRe.APIRequestException.Request
get

The original request object (obtained via the IRestResponse.Request property)

Definition at line 27 of file APIRequestException.cs.

◆ RestResponse

IRestResponse AnalyzeRe.APIRequestException.RestResponse
getset

The IRestResponse that generated this exception.

Definition at line 19 of file APIRequestException.cs.

◆ ServerError

ServerError AnalyzeRe.APIRequestException.ServerError
getset

The ServerError object parsed from the response body, if available.

Definition at line 23 of file APIRequestException.cs.


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