Skip to main content

Class: MobxKeystoneAggregateError

A mobx-keystone error that groups several failures that happened while delivering a single notification, such as multiple patch listeners or root store hooks throwing.

It is only used when more than one callback failed; a lone failure is rethrown as is.

Extends​

Constructors​

Constructor​

new MobxKeystoneAggregateError(errors, msg): MobxKeystoneAggregateError;

Parameters​

ParameterType
errorsreadonly unknown[]
msgstring

Returns​

MobxKeystoneAggregateError

Overrides​

MobxKeystoneError.constructor

Properties​

cause?​

optional cause?: unknown;

Inherited from​

MobxKeystoneError.cause


errors​

readonly errors: readonly unknown[];

The values thrown by the failing callbacks, in the order they were thrown.


message​

message: string;

Inherited from​

MobxKeystoneError.message


name​

name: string;

Inherited from​

MobxKeystoneError.name


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