FritzApi.Error exception (fritz_api v3.1.0)

Copy Markdown View Source

A FritzApi Error

Summary

Types

Why the request failed.

The HTTP response that caused the error, if there was one.

t()

Types

reason()

@type reason() ::
  :session_expired
  | :user_not_authorized
  | :actor_not_found
  | :bad_request
  | :internal_error
  | :unknown
  | :login_failed
  | {:login_failed, [{:block_time, non_neg_integer()}]}
  | {:unexpected_response, term()}
  | term()

Why the request failed.

Besides the reasons listed here, it can be any term returned by the HTTP client, for example %Finch.TransportError{reason: :timeout}.

response()

The HTTP response that caused the error, if there was one.

t()

@type t() :: %FritzApi.Error{
  __exception__: term(),
  reason: reason(),
  response: response() | nil
}