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

Raised when a cast fails.

Summary

Functions

Formats the error map to an error message.

Types

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

Functions

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

Formats the error map to an error message.