Class in Errors · JavaScript & TypeScript
Base class for every error the SDK returns, throws or reports, in both entry points
class FluxerlyError extends ErrorNarrow a specific failure with its readonly _tag, read code for a stable identifier and hint for a suggested fix. The standard cause property keeps the underlying failure when the SDK retained one, and details holds safe structured facts. Messages the SDK writes and details never include tokens or other credentials
ApplicationError and SdkDefect messages quote application-supplied error text with credential patterns masked, while the cause property keeps the original value unchanged. Use describeError for a readable multi-line summary, and toJSON for a structured summary whose names and messages, including those in the cause chain, have credential patterns masked
Built-in JSON log output uses the LogRecord shape instead
Constructor#
new FluxerlyError(
message: string,
options: FluxerlyErrorOptions
): FluxerlyErrornew FluxerlyError(
message: string,
options: FluxerlyErrorOptions
): FluxerlyErrorParameters
message-
string options-
FluxerlyErrorOptions
Properties#
_tag#
Discriminator that identifies the concrete error class
readonly _tag: stringcode#
Stable dotted identifier for this failure, suitable for alerts and metrics
readonly code: stringdetails#
Frozen safe structured facts about the failure, without credentials or private payloads
readonly details: Readonly<Record<string, unknown>>readonly details: Readonly<
Record<string, unknown>
>hint#
Actionable next step for a person reading the error, or undefined when the SDK has no suggestion
readonly hint: string | undefinedMethods#
toJSON #
Return a plain JSON-safe summary with tag, code, message, hint, details and a summarized cause chain
Credential patterns in names and messages are masked, while the original cause remains unchanged
toJSON(): FluxerlyErrorJson- Returns
FluxerlyErrorJson