Packages

Build Elixir structs with validation, sanitization, nested sub-structs, conditional fields, pattern-keyed maps, and an Ash extension. Built on Spark.

Current section

Files

Jump to
guarded_struct lib guarded_struct errors unknown.ex
Raw

lib/guarded_struct/errors/unknown.ex

defmodule GuardedStruct.Errors.Unknown do
@moduledoc false
use Splode.Error, fields: [:error, :message], class: :invalid
@impl true
def message(%{message: msg}) when is_binary(msg), do: msg
def message(%{error: e}), do: inspect(e)
end