On This Page

FluxerlyError

Class in Errors · JavaScript & TypeScript

Base class for every error the SDK returns, throws or reports, in both entry points

Narrow 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

class FluxerlyError extends Error

Constructor#

new FluxerlyError(
    message: string,
    options: FluxerlyErrorOptions
): FluxerlyErrornew FluxerlyError(
  message: string,
  options: FluxerlyErrorOptions
): FluxerlyError

Parameters

message
string

Properties#

_tag#

Discriminator that identifies the concrete error class

readonly _tag: string

code#

Stable dotted identifier for this failure, suitable for alerts and metrics

readonly code: string

details#

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 | undefined

Methods#

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