Skip to content

basalt / core/src / BasaltErrorOptions

Interface: BasaltErrorOptions ​

Defined in: core/src/errors.ts:5

Options for every BasaltError — the standard cause, plus an optional structured payload.

Extends ​

  • ErrorOptions

Extended by ​

Properties ​

details? ​

> optional details?: Record<string, unknown>

Defined in: core/src/errors.ts:17

Machine-readable data about this failure, for the caller to act on: which checks failed, how much quota is left, the current version behind a conflict. Without it the only place to put that data is the human-readable message, and the UI ends up parsing sentences.

When the error carries a numeric status, @basaltkit/http serialises a sanitised copy of this as error.details in the HTTP body — so treat it as PUBLIC: no secrets, no internals, plain JSON data only, and small. See the rules in @basaltkit/http's "Structured error details".

Released under the MIT License.