Jido.Error.ValidationError exception (Jido v2.1.0)

View Source

Error for validation failures.

Covers invalid inputs, actions, sensors, and configurations.

Fields

  • message - Human-readable error message
  • kind - Category: :input, :action, :sensor, :config
  • subject - The invalid value (field name, action module, etc.)
  • details - Additional context

Summary

Types

t()

@type t() :: %Jido.Error.ValidationError{
  __exception__: true,
  bread_crumbs: term(),
  class: term(),
  details: map(),
  kind: :input | :action | :sensor | :config | nil,
  message: String.t(),
  path: term(),
  splode: term(),
  stacktrace: term(),
  subject: any(),
  vars: term()
}

Functions

exception(msg)

@spec exception(opts :: Keyword.t()) :: %Jido.Error.ValidationError{
  __exception__: true,
  bread_crumbs: term(),
  class: term(),
  details: term(),
  kind: term(),
  message: term(),
  path: term(),
  splode: term(),
  stacktrace: term(),
  subject: term(),
  vars: term()
}

Create an Elixir.Jido.Error.ValidationError without raising it.

Keys

  • :message
  • :kind
  • :subject
  • :details