Raised/returned for non-2xx responses from the Synctera API.
Functions in Synctera.* resource modules return {:error, %Synctera.Error{}}
in their non-bang form, and raise this struct (it implements the Exception
behaviour) in their bang (!) form.
Summary
Functions
True for a 401 Unauthorized response.
True for a 400 Bad Request response.
True for a 409 Conflict response. This includes Synctera's IDEMPOTENCY_CONCURRENT_USE conflicts on money-movement endpoints.
Builds a Synctera.Error from an HTTP status, decoded body, and request context.
True for a 404 Not Found response.
True for a 403 Forbidden response.
True for a 429 Too Many Requests response. The client already retries these internally up to the configured retry limit.
True for any 5xx response.
True for a 422 Unprocessable Entity response. This includes Synctera's IDEMPOTENCY_INVALID_REUSE errors.
Types
@type t() :: %Synctera.Error{ __exception__: true, body: map() | nil, code: String.t() | nil, message: String.t(), method: String.t(), request_id: String.t() | nil, retry_after: non_neg_integer() | nil, status: pos_integer(), url: String.t() }
Functions
True for a 401 Unauthorized response.
True for a 400 Bad Request response.
True for a 409 Conflict response. This includes Synctera's IDEMPOTENCY_CONCURRENT_USE conflicts on money-movement endpoints.
@spec from_response( pos_integer(), String.t(), String.t(), map() | nil, String.t() | nil, non_neg_integer() | nil ) :: t()
Builds a Synctera.Error from an HTTP status, decoded body, and request context.
True for a 404 Not Found response.
True for a 403 Forbidden response.
True for a 429 Too Many Requests response. The client already retries these internally up to the configured retry limit.
True for any 5xx response.
True for a 422 Unprocessable Entity response. This includes Synctera's IDEMPOTENCY_INVALID_REUSE errors.