Raised when a cast fails.
Formats the error map to an error message.
@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 }
@spec format_error(t()) :: String.t()