Skip to content

Pain001ApiException

Namespace Pain001.Sdk.

The pain001 server answered with a status outside 2xx.

Remarks

The message names the status only. The server's detail can echo the request (an IBAN, a row of the uploaded file), and payment data must not reach a log through an exception message, so it is kept in Pain001ApiException.Detail for the caller to inspect. When Pain001Client.GenerateAsync is refused for the data, the exception is a Pain001GenerationRefusedException, which also carries the findings in typed form.

Methods

Pain001ApiException()

Creates an exception with a default message.

Pain001ApiException(Int32, JsonElement)

Creates an exception for an HTTP error response.

Parameter Description
statusCode The HTTP status code.
detail The response's detail field, or the whole body when it has none.

Pain001ApiException(String)

Creates an exception with the given message.

Parameter Description
message What went wrong.

Pain001ApiException(String, Exception)

Creates an exception with a message and its cause.

Parameter Description
message What went wrong.
innerException The exception that caused this one.

Pain001ApiException(String, Int32, JsonElement)

Creates an exception for an HTTP error response, with a message for a subclass that knows more about the error.

Parameter Description
message What went wrong; never the detail itself.
statusCode The HTTP status code.
detail The response's detail field, or the whole body when it has none.

Properties

Detail

The server's detail: a string for most errors, an array of validation errors for HTTP 422, or the whole body when it has no detail field (a refused generate call). Undefined when the response had no body.

StatusCode

The HTTP status code, or 0 when there was no response.

All types