ArchAstro.Error exception (archastro v0.2.0)

Copy Markdown

Typed REST API or transport error.

Summary

Types

reason()

@type reason() :: t() | transport_reason()

t()

@type t() :: %ArchAstro.Error{
  __exception__: term(),
  code: String.t() | nil,
  details: ArchAstro.JSON.t() | nil,
  message: String.t(),
  reason: transport_reason() | nil,
  request_id: String.t() | nil,
  status: integer() | nil
}

transport_reason()

@type transport_reason() :: Exception.t() | atom() | tuple()

Functions

channel(error)

@spec channel(ArchAstro.JSON.t() | transport_reason() | t()) :: t()

from_response(response)

@spec from_response(Req.Response.t()) :: t()

transport(reason)

@spec transport(transport_reason()) :: t()