BowlineClient.Error exception (bowline_client v1.2.0)

Copy Markdown View Source

A failed call: the Bowline error code, the message, the HTTP status, details, and validation issues.

Summary

Types

code()

@type code() ::
  :canceled
  | :unknown
  | :invalid_argument
  | :deadline_exceeded
  | :not_found
  | :already_exists
  | :permission_denied
  | :resource_exhausted
  | :failed_precondition
  | :aborted
  | :out_of_range
  | :unimplemented
  | :internal
  | :unavailable
  | :data_loss
  | :unauthenticated

t()

@type t() :: %BowlineClient.Error{
  __exception__: true,
  code: code(),
  details: term(),
  issues: [BowlineClient.Issue.t()],
  message: String.t(),
  status: non_neg_integer(),
  type: String.t() | nil
}

Functions

code_from_string(code)

@spec code_from_string(String.t()) :: code()

code_to_string(code)

@spec code_to_string(code()) :: String.t()

from_envelope(status, arg2)

@spec from_envelope(non_neg_integer(), term()) :: t()