basalt / sdk/src / BasaltClientError
Class: BasaltClientError
Defined in: sdk/src/errors.ts:32
Error thrown by the client for any non-2xx response (or a response that fails the endpoint's result schema). code mirrors the server's stable error code, so callers branch on it the same way on both sides.
Kept dependency-free (no @basaltkit/core) so the SDK stays browser-friendly.
Extends
Error
Constructors
Constructor
> new BasaltClientError(status, code, message, details?): BasaltClientError
Defined in: sdk/src/errors.ts:33
Parameters
status
number
code
string
message
string
details?
unknown
Returns
BasaltClientError
Overrides
Error.constructor
Properties
code
> readonly code: string
Defined in: sdk/src/errors.ts:35
details?
> readonly optional details?: unknown
Defined in: sdk/src/errors.ts:37
status
> readonly status: number
Defined in: sdk/src/errors.ts:34
Accessors
errorDetails
Get Signature
> get errorDetails(): Record<string, unknown> | undefined
Defined in: sdk/src/errors.ts:48
The server's structured error.details, or undefined when the response carried none. details is the whole response body; this is the payload the server meant the UI to act on — no casting, no digging.
Returns
Record<string, unknown> | undefined