View Source Stellar.Horizon.Error (Elixir Stellar SDK v0.21.1)

Represents an error which occurred during a Horizon API call.

Summary

Types

@type base64_xdr() :: String.t()
@type detail() :: String.t() | nil
@type error() :: {error_source(), error_body()}
@type error_body() :: map() | atom() | String.t()
@type error_source() :: :horizon | :network
@type extras() :: %{
  optional(:envelope_xdr) => base64_xdr(),
  optional(:result_codes) => result_codes(),
  optional(:result_xdr) => base64_xdr()
}
@type result_code() :: String.t()
@type result_codes() :: %{
  optional(:transaction) => result_code(),
  optional(:operations) => [result_code()]
}
@type status_code() :: 200 | 400 | 404 | 406 | 422 | 500 | :network_error
@type t() :: %Stellar.Horizon.Error{
  detail: detail(),
  extras: extras(),
  status_code: status_code(),
  title: title(),
  type: type()
}
@type title() :: String.t() | nil
@type type() :: String.t() | nil

Functions

@spec new(error :: error()) :: t()