ash_state_machine/lib/errors/no_matching_event.ex

13 lines
423 B
Elixir
Raw Normal View History

defmodule AshStateMachine.Errors.NoMatchingTransition do
@moduledoc "Used when a state change occurs in an action with no matching transition"
2024-03-30 11:01:07 +13:00
use Splode.Error,
fields: [:action, :target, :old_state],
class: :invalid
def message(error) do
"""
Attempted to change state from #{error.old_state} to #{error.target} in action #{error.action}, but no matching transition was configured.
"""
2023-04-22 07:25:39 +12:00
end
end