ExFattureincloud.Error exception (ExFattureincloud v0.1.0)

Copy Markdown View Source

Normalized validation, authentication, transport, HTTP or protocol error.

API validation details remain in body. code also handles OAuth string errors such as authorization_pending. retry_after is in seconds. cause preserves the transport exception. Inspect excludes body, headers and cause.

Summary

Functions

Converts an unsuccessful Req response while preserving its body and quota headers.

Builds a local parameter-validation error without an HTTP status.

Types

t()

@type t() :: %ExFattureincloud.Error{
  __exception__: term(),
  body: term(),
  cause: term(),
  code: term(),
  headers: map(),
  kind: atom(),
  message: String.t(),
  rate_limit: ExFattureincloud.RateLimit.t() | nil,
  retry_after: integer() | nil,
  status: integer() | nil
}

Functions

from_req(response)

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

Converts an unsuccessful Req response while preserving its body and quota headers.

validation(message)

@spec validation(String.t()) :: t()

Builds a local parameter-validation error without an HTTP status.