Class: CallError
Thrown when a call or a value can't be decoded, resolved, allowed, run or encoded
(extends MobxKeystoneError). Errors thrown by the action or view being called are not
CallErrors: they are rethrown as they are.
Use instanceof CallError to distinguish call errors from other
MobxKeystoneError instances.
Extends
Constructors
Constructor
new CallError(data): CallError;
Parameters
| Parameter | Type |
|---|---|
data | CallErrorData |
Returns
CallError
Overrides
Properties
cause?
readonly optional cause?: unknown;
The error that caused it, if any.
Overrides
code
readonly code: CallErrorCode;
The reason.
message
message: string;
Inherited from
name
name: string;
Inherited from
path
readonly path: Path;
Where in the call or value the error is, e.g. ["args", 1].
stack?
optional stack?: string;
Inherited from
Methods
toJSON()
toJSON(): CallErrorJson;
The error as JSON, for RPC and tool layers. It leaves out the cause's message, and the value
preview of a CannotEncode error, since they may hold the server's data.
Returns
isError()
static isError(error): error is Error;
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
| Parameter | Type |
|---|---|
error | unknown |
Returns
error is Error