Packages
Elixir framework for building production-ready AI agents and LLM applications: type-safe schemas with JSON Schema generation, tool calling, streaming, multi-agent coordination, guardrails, and distributed fault-tolerant sessions, with first-class Anthropic Claude support.
Current section
Files
Jump to
Current section
Files
lib/normandy/schema/validation_error.ex
defmodule Normandy.Schema.ValidationError do
@moduledoc """
Exception raised when schema validation fails.
"""
defexception [:message, :errors]
@type t :: %__MODULE__{
message: String.t(),
errors: [map()]
}
@impl true
def exception(opts) do
message = Keyword.get(opts, :message, "Validation failed")
errors = Keyword.get(opts, :errors, [])
%__MODULE__{
message: message,
errors: errors
}
end
end