A normalized error struct returned by every StarlingBank function on failure.
Starling's APIs return a few different error shapes depending on the
failure type (OAuth errors, {"errors": [...]}, {"success": false}, plain
HTTP errors, etc). This struct normalizes all of them.
Summary
Types
@type reason() ::
:unauthorized
| :forbidden
| :insufficient_scope
| :not_found
| :bad_request
| :rate_limited
| :server_error
| :network_error
| :decode_error
| :unknown
@type t() :: %StarlingBank.Error{ __exception__: true, details: term(), message: String.t(), reason: reason(), request_id: String.t() | nil, status: pos_integer() | nil }