Class ApiException
API Exception
Implements
Inherited Members
System.Exception.GetBaseException()
System.Exception.HResult
System.Exception.Source
System.Exception.StackTrace
System.Exception.TargetSite
object.Equals(object, object)
object.MemberwiseClone()
Namespace: mailslurp.Client
Assembly: mailslurp.dll
Syntax
public class ApiException : Exception, ISerializable
Constructors
View SourceApiException()
Initializes a new instance of the ApiException class.
Declaration
public ApiException()
ApiException(int, string, object, Multimap<string, string>)
Initializes a new instance of the ApiException class.
Declaration
public ApiException(int errorCode, string message, object errorContent = null, Multimap<string, string> headers = null)
Parameters
Type | Name | Description |
---|---|---|
int | errorCode | HTTP status code. |
string | message | Error message. |
object | errorContent | Error content. |
Multimap<string, string> | headers | HTTP Headers. |
ApiException(int, string)
Initializes a new instance of the ApiException class.
Declaration
public ApiException(int errorCode, string message)
Parameters
Type | Name | Description |
---|---|---|
int | errorCode | HTTP status code. |
string | message | Error message. |
Properties
View SourceErrorCode
Gets or sets the error code (HTTP status code)
Declaration
public int ErrorCode { get; set; }
Property Value
Type | Description |
---|---|
int | The error code (HTTP status code). |
ErrorContent
Gets or sets the error content (body json object)
Declaration
public object ErrorContent { get; }
Property Value
Type | Description |
---|---|
object | The error content (Http response body). |
Headers
Gets or sets the HTTP headers
Declaration
public Multimap<string, string> Headers { get; }
Property Value
Type | Description |
---|---|
Multimap<string, string> | HTTP headers |