Skip to main content
zerotal

Documentation


Documentation / zerotal / orm / StateError

Class: StateError

Defined in: packages/orm/src/errors/StateError.ts:8

Thrown when model.transitionTo() is called with a state that is not reachable from the model's current state, or when a target-state guard rejects the transition.

Extends

Constructors

Constructor

new StateError(model, from, to, detail?): StateError

Defined in: packages/orm/src/errors/StateError.ts:9

Parameters

model

string

from

string

to

string

detail?

string

Returns

StateError

Overrides

ZerotalError.constructor

Properties

code

readonly code: string

Defined in: packages/core/src/errors/ZerotalError.ts:18

Inherited from

ZerotalError.code


status

readonly status: number = 500

Defined in: packages/core/src/errors/ZerotalError.ts:19

Inherited from

ZerotalError.status


context?

readonly optional context?: Record<string, unknown>

Defined in: packages/core/src/errors/ZerotalError.ts:20

Inherited from

ZerotalError.context