ActionError

class ActionError(val identity: String, val verb: String, val path: String, val at: List<Int> = emptyList(), message: String? = null)

Why an interaction stopped.

An action error is returned, not thrown — it rides out in ApplyResult.error alongside whatever the interaction managed to apply before it hit the problem. That is the deliberate shape of the contract: an interaction stops where it failed, and the writes that already landed stay landed.

identity is the stable, message-free string conformance fixtures assert against; the message is free-form context and never part of the contract. The closed set:

  • malformedAction — a verb whose fields do not make sense together: insert given both or neither of value/values, update with no selector, upsert whose value lacks its key field, key without equals

  • malformedPointer — a path, field or $event pointer that will not parse

  • pathMismatch — the path walks through a value that is not a container

  • notAnArray, notAnObject, notABoolean, notANumber — the target exists but has the wrong shape for the verb

verb and path locate the failing action, and at is its index trail through nested sequences — [1, 0] is the first action of the second action of the top-level sequence.

Constructors

Link copied to clipboard
constructor(identity: String, verb: String, path: String, at: List<Int> = emptyList(), message: String? = null)

Types

Link copied to clipboard
object Companion

The closed set of identities, named so callers can match without string literals.

Properties

Link copied to clipboard
val at: List<Int>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard