Skip to main content

Class: MutationCancelledError

Defined in: model/errors.ts:845

code: 'mutation-cancelled' — a beforeChange handler returned false, refusing the whole changeset. Thrown by the programmatic call that triggered the transaction, carrying the changeset that was refused — entries.update()'s contract is to return the stored entry, and if nothing was stored, returning one would be a lie.

reason is what the vetoing handler said through refuse(reason) (#210), and undefined when it returned a bare false. The message quotes it verbatim: the words are prose the consumer wrote for their own user, so core frames them and never rewords them.

Extends​

Constructors​

Constructor​

new MutationCancelledError(changeSet, reason?): MutationCancelledError

Defined in: model/errors.ts:849

Parameters​

changeSet​

ChangeSet

reason?​

string

Returns​

MutationCancelledError

Overrides​

FreeGanttError.constructor

Properties​

changeSet​

readonly changeSet: ChangeSet

Defined in: model/errors.ts:846


code​

readonly code: ThrownCode

Defined in: model/errors.ts:104

Inherited from​

FreeGanttError.code


reason​

readonly reason: string | undefined

Defined in: model/errors.ts:847