Clov Packages
    Preparing search index...

    Interface LocalizedExceptionOptions<TCause>

    Options accepted by the LocalizedException constructor.

    key is omitted: it comes from the first positional argument, and accepting it twice would silently ignore one of the two.

    interface LocalizedExceptionOptions<TCause = unknown> {
        cause?: TCause;
        code?: string;
        defaultLocale: string;
        params?: Readonly<Record<string, string>>;
        translations: Translations;
    }

    Type Parameters

    • TCause = unknown

      Type of the underlying cause.

    Hierarchy (View Summary)

    Index
    cause?: TCause

    Original error or contextual value that triggered this exception.

    code?: string

    Application-specific error code (e.g. 'jwt.token.expired').

    defaultLocale: string

    Locale used to build the default message string.

    params?: Readonly<Record<string, string>>

    Parameter values to interpolate into {{placeholder}} tokens.

    translations: Translations

    All available translations keyed by locale.