Noizu.Dropbox.Error exception (Noizu Dropbox v0.1.0)

Copy Markdown View Source

Structured error returned by Dropbox API calls.

Summary

Functions

Build an encoding/decoding error.

Missing configuration (token, credentials, etc.).

Build an error from an HTTP response body (JSON map or raw).

Build a transport / client-side error.

Types

t()

@type t() :: %Noizu.Dropbox.Error{
  __exception__: term(),
  body: term(),
  message: String.t(),
  reason: term(),
  status: pos_integer() | nil,
  summary: String.t() | nil,
  tag: String.t() | atom() | nil
}

Functions

codec(reason)

@spec codec(term()) :: t()

Build an encoding/decoding error.

config(message)

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

Missing configuration (token, credentials, etc.).

from_response(status, body)

@spec from_response(pos_integer(), term()) :: t()

Build an error from an HTTP response body (JSON map or raw).

transport(reason)

@spec transport(term()) :: t()

Build a transport / client-side error.