Represents the options for the Basalt error.

interface BasaltErrorOptions<T = unknown> {
    cause?: T;
    httpStatusCode?: number;
    key?: string;
    message?: string;
}

Type Parameters

  • T = unknown

Properties

cause?: T

The cause of the error, which can be an original error or additional context.

httpStatusCode?: number

The HTTP status code associated with the error, typically used in API responses.

key?: string

A unique key identifying the type of error, useful for localization or error handling.

message?: string

The error message describing what went wrong.