Skip to main content

Class: SnapshotTypeMismatchError

Thrown when a snapshot value does not match any of the expected types in a union (extends MobxKeystoneError).

Use instanceof SnapshotTypeMismatchError to distinguish snapshot type-mismatch errors from other MobxKeystoneError instances.

Extends​

Constructors​

Constructor​

new SnapshotTypeMismatchError(data): SnapshotTypeMismatchError;

Parameters​

ParameterType
dataSnapshotTypeMismatchErrorData

Returns​

SnapshotTypeMismatchError

Overrides​

MobxKeystoneError.constructor

Properties​

actualValue​

readonly actualValue: any;

cause?​

optional cause?: unknown;

Inherited from​

MobxKeystoneError.cause


expectedTypeName​

readonly expectedTypeName: string;

message​

message: string;

Inherited from​

MobxKeystoneError.message


modelTrail?​

readonly optional modelTrail?: readonly string[];

name​

name: string;

Inherited from​

MobxKeystoneError.name


path​

readonly path: Path;

stack?​

optional stack?: string;

Inherited from​

MobxKeystoneError.stack

Methods​

isError()​

static isError(error): error is Error;

Indicates whether the argument provided is a built-in Error instance or not.

Parameters​

ParameterType
errorunknown

Returns​

error is Error

Inherited from​

MobxKeystoneError.isError