Assent.MissingConfigError exception (Assent v0.4.0)

Copy Markdown View Source

An exception for when a required configuration key is missing.

The :config field is omitted from Inspect output as it may contain sensitive data.

Fields

  • :key - the missing configuration key
  • :config - the original configuration

Examples

iex> {:error, error} = Assent.fetch_config([client_secret: "secret"], :client_id)
iex> Exception.message(error)
"expected :client_id in config, got: [:client_secret]"
iex> inspect(error)
"#Assent.MissingConfigError<key: :client_id, ...>"

Summary

Functions

Callback implementation for Exception.message/1.

Types

t()

@type t() :: %Assent.MissingConfigError{
  __exception__: term(),
  config: Keyword.t(),
  key: atom()
}

Functions

message(exception)

Callback implementation for Exception.message/1.