Dowser.Client.JSON.Error exception (Dowser.Client v0.1.1)

View Source

JSON codec error.

Wraps whatever a Dowser.Client.JSON.Adapter surfaced while encoding or decoding — a returned {:error, reason} or a raised dependency exception (Jason.EncodeError, Protocol.UndefinedError, ...) — so callers never receive a dependency's own exception type. :operation is :encode or :decode; the original term is kept in :reason.

Summary

Types

t()

@type t() :: %Dowser.Client.JSON.Error{
  __exception__: true,
  adapter: module() | nil,
  operation: :encode | :decode | nil,
  reason: term()
}