Xema.CastError exception (xema v0.13.6) View Source

Raised when a cast fails.

Link to this section Summary

Functions

Formats the error map to an error message.

Link to this section Types

Specs

t() :: %Xema.CastError{
  __exception__: term(),
  error: struct() | nil,
  key: String.t() | atom() | nil,
  message: String.t() | nil,
  path: [atom() | integer() | String.t()] | nil,
  required: [atom()] | nil,
  to: atom() | nil,
  value: term() | nil
}

Link to this section Functions

Specs

format_error(t()) :: String.t()

Formats the error map to an error message.