Configuration shared by AbstractGenericError subclasses.

These options mirror the historical constructor contract from the CommonJS implementation while making the formatting hooks explicit.

interface GenericErrorOptions {
    message?: string;
    messageParams?: unknown;
    parentError?: Error;
    payload?: Record<string, unknown>;
}

Hierarchy (View Summary)

Properties

message?: string

Message template (sprintf-compatible) used for the error.

messageParams?: unknown

Parameters that will be interpolated into the formatted message.

parentError?: Error

Underlying error that triggered the current failure.

payload?: Record<string, unknown>

Additional structured data attached to the error instance.