Skip to main content

Interface: CallErrorData

What a CallError is built from, e.g. by a custom ValueSerializer that wants to choose the code (a CallError it throws passes through as it is; any other error is wrapped).

Properties​

cause?​

optional cause?: unknown;

The error that caused it, if any. Its message is added to message, but left out of toJSON(), since it may hold the server's data.


code​

code: CallErrorCode;

The reason.


message​

message: string;

The message, without the path and value preview the error adds to it.


path?​

optional path?: Path;

Path relative to the call or value, e.g. ["args", 1, "items", 3]. Defaults to where the value being encoded or decoded is.


previewValue?​

optional previewValue?: unknown;

The value the error is about, shown in the message.