@bluelibs/runner - v5.5.0
    Preparing search index...

    Interface IErrorDefinition<TData>

    interface IErrorDefinition<TData extends DefaultErrorType = DefaultErrorType> {
        dataSchema?: IValidationSchema<TData>;
        format?: (data: TData) => string;
        httpCode?: number;
        id: string;
        meta?: IErrorMeta;
        parse?: (data: string) => TData;
        remediation?: string | ((data: TData) => string);
        serialize?: (data: TData) => string;
        tags?: TagType[];
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    dataSchema?: IValidationSchema<TData>

    Validate error data on throw(). If provided, data is parsed first.

    format?: (data: TData) => string
    httpCode?: number
    id: string
    meta?: IErrorMeta
    parse?: (data: string) => TData
    remediation?: string | ((data: TData) => string)

    Optional advice on how to fix the error. Appears in the stringified error message after the main message. Can be a static string or a function that receives the error data and returns a string.

    serialize?: (data: TData) => string
    tags?: TagType[]