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

Raised when a cast fails.

Summary

Functions

Formats the error map to an error message.

Types

t()

@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

format_error(error)

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

Formats the error map to an error message.