Skip to content

basalt / sdk/src / BasaltErrorBody

Interface: BasaltErrorBody ​

Defined in: sdk/src/errors.ts:6

The error body every Basalt adapter serves (@basaltkit/http's neutral serializer), described here so callers can read a failed response without casting their way through unknown.

Properties ​

error ​

> error: object

Defined in: sdk/src/errors.ts:7

code ​

> code: string

Stable, machine-readable code — safe to branch on.

details? ​

> optional details?: Record<string, unknown>

Structured payload from a server error deliberately constructed with one (new HttpError(status, code, message, { details })). Plain JSON data, bounded by the server — which checks failed, how much quota is left, the current version behind a conflict.

issues? ​

> optional issues?: object[]

Validation failures only: one entry per offending field.

message ​

> message: string

part? ​

> optional part?: "body" | "query" | "params"

Validation failures only: which part of the request failed.

Released under the MIT License.