Skip to content

Pain001GenerationRefusedException

Namespace Pain001.Sdk.

The server refused to generate the XML because rows failed validation or a scheme rule: HTTP 422 with success: false (pain001 0.0.87 and later).

Remarks

Pain001ApiException.StatusCode is 422, Pain001ApiException.Detail is the whole body (it has no detail field), and Pain001GenerationRefusedException.Response holds the body decoded: the blocking UiGenerateResponse.ValidationErrors and UiGenerateResponse.SchemeViolations. A caller that catches Pain001ApiException still catches this one.

A 422 for a malformed request (an unknown message type) has a detail array instead, and stays a plain Pain001ApiException. The message gives the status and how many findings there are, never the findings themselves, which can quote payment data.

Methods

Pain001GenerationRefusedException()

Creates an exception with a default message.

Pain001GenerationRefusedException(Int32, JsonElement, UiGenerateResponse)

Creates an exception for a refused generate call.

Parameter Description
statusCode The HTTP status code, 422.
body The whole response body.
response The body, decoded.

Pain001GenerationRefusedException(String)

Creates an exception with the given message.

Parameter Description
message What went wrong.

Pain001GenerationRefusedException(String, Exception)

Creates an exception with a message and its cause.

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

Properties

Response

The decoded refusal: UiGenerateResponse.Success is false, UiGenerateResponse.Xml is null, and the findings are in UiGenerateResponse.ValidationErrors and UiGenerateResponse.SchemeViolations.

All types