Structured error returned by the GoCardlessClient API.
Fields
:status— HTTP status code:type—"gocardless_error","invalid_api_usage","invalid_state","validation_failed":message— human-readable description:request_id— GoCardlessClient request ID for support:documentation_url— relevant API docs URL:errors— list ofGoCardlessClient.FieldErrorfor validation failures
Summary
Functions
Returns true if this is a 409 Conflict error.
Builds an APIError from a decoded JSON response body.
Returns true if the action cannot be performed in the resource's current state.
Returns true if this is a 404 Not Found error.
Returns true if this is a 429 rate-limited response.
Returns true if this is an internal GoCardlessClient server error.
Returns true if this is a 422 validation failure.
Types
@type t() :: %GoCardlessClient.APIError{ __exception__: true, documentation_url: String.t() | nil, errors: [GoCardlessClient.FieldError.t()], message: String.t() | nil, raw: map() | nil, request_id: String.t() | nil, status: non_neg_integer(), type: String.t() | nil }
Functions
Returns true if this is a 409 Conflict error.
@spec from_response(non_neg_integer(), map() | any()) :: t()
Builds an APIError from a decoded JSON response body.
Returns true if the action cannot be performed in the resource's current state.
Returns true if this is a 404 Not Found error.
Returns true if this is a 429 rate-limited response.
Returns true if this is an internal GoCardlessClient server error.
Returns true if this is a 422 validation failure.