Increase.Error exception (Increase v1.0.0)

Copy Markdown View Source

Represents an error returned by the Increase API, or a transport-level failure (timeout, connection refused, etc).

API errors conform to RFC 9457 and always have the same shape: type, title, status, and a nullable detail. See the Errors documentation for the full list of type values.

Examples

{:error, %Increase.Error{type: "invalid_operation_error", status: 409}} =
  Increase.Accounts.close(client, "account_with_balance")

Summary

Types

t()

@type t() :: %Increase.Error{
  __exception__: true,
  detail: String.t() | nil,
  raw_body: term(),
  status: integer() | nil,
  title: String.t() | nil,
  type: String.t() | nil
}