ErrorBody
Context the helpers of the server use to describe a thrown value.
Context the helpers of the server use to describe a thrown value.
Import#
ts
import type { ErrorBody } from "@shadow-js/dusk/server";
Signature#
ts
interface ErrorBody {
readonly name: string;
readonly message: string;
readonly status: number;
/** A stable code for the client, such as `SEARCH_INVALID`, when the error has one. */
readonly code?: string;
readonly issues?: readonly ValidationIssue[];
readonly data?: unknown;
readonly requestId?: string;
}
Members#
| Name | Type | Description |
|---|---|---|
name |
readonly name: string |
|
message |
readonly message: string |
|
status |
readonly status: number |
|
code? |
readonly code?: string |
A stable code for the client, such as SEARCH_INVALID, when the error has one. |
issues? |
readonly issues?: readonly ValidationIssue[] |
|
data? |
readonly data?: unknown |
|
requestId? |
readonly requestId?: string |