View Source ExTrade.Response.Error (ExTrade v0.0.1)

A struct which represents an error that occurred during an E*TRADE API call.

This struct is designed to provide all the information needed to effectively manage an error response.

It contains the following fields:

  • :body – the raw HTTP response body
  • :status_code – the HTTP response status code (e.g., 401)
  • :status_reason – the human-readable interpretation of the status_code (e.g., "Unauthorized")
  • :error_code – the custom error code sent by E*TRADE and parsed from body
  • :user_reason – the custom error reason/message sent by E*TRADE and parsed from body

Link to this section Summary

Link to this section Types

@type t() :: %ExTrade.Response.Error{
  body: String.t(),
  error_code: integer() | nil,
  error_reason: String.t() | nil,
  status_code: integer(),
  status_reason: String.t() | nil
}