MollieEx.Error exception (mollie_ex v0.2.0)

Copy Markdown View Source

Error returned by MollieEx public API functions.

Ordinary SDK calls return errors in result tuples:

{:error, %MollieEx.Error{}}

Bang functions may raise this exception directly once those functions exist.

Summary

Types

error_type()

@type error_type() ::
  :api_error
  | :authentication
  | :authorization
  | :not_found
  | :gone
  | :validation
  | :rate_limited
  | :server_error
  | :timeout
  | :transport
  | :decode
  | :configuration
  | :unexpected

t()

@type t() :: %MollieEx.Error{
  __exception__: true,
  body: term(),
  detail: String.t() | nil,
  field: String.t() | nil,
  headers: map() | keyword() | [{term(), term()}] | nil,
  idempotency_key_fingerprint: String.t() | nil,
  links: term(),
  message: String.t() | nil,
  method: atom() | String.t() | nil,
  operation: atom() | nil,
  path: String.t() | nil,
  raw: term(),
  reason: term(),
  request_id: String.t() | nil,
  source: term(),
  status: non_neg_integer() | nil,
  title: String.t() | nil,
  type: error_type()
}