Exosphere.ATProto.XRPC.Error (Exosphere v0.4.0)

Copy Markdown View Source

XRPC error handling.

XRPC errors follow a standard format with:

  • error - A short error code string
  • message - A human-readable description

Summary

Functions

Create an Error from an HTTP response.

Types

t()

@type t() :: %Exosphere.ATProto.XRPC.Error{
  error: String.t(),
  message: String.t() | nil,
  status: pos_integer()
}

Functions

from_response(status, body)

@spec from_response(pos_integer(), map() | binary()) :: t()

Create an Error from an HTTP response.