OpenPayments.Error exception (open_payments_elixir v1.0.0)

Copy Markdown View Source

Structured errors returned by Open Payments operations and protocol validation.

Validation issues identify a field and explain its constraint without retaining the rejected value. Inspection omits descriptions and arbitrary server details; applications should take care when logging those fields explicitly.

Summary

Types

kind()

@type kind() ::
  :configuration | :validation | :signing | :transport | :http | :decoding

t()

@type t() :: %OpenPayments.Error{
  __exception__: term(),
  code: String.t() | nil,
  description: String.t() | nil,
  details: map() | nil,
  kind: kind(),
  operation: atom() | nil,
  status: pos_integer() | nil,
  validation_errors: [validation_issue()]
}

validation_issue()

@type validation_issue() :: %{field: atom() | String.t(), message: String.t()}