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

    Interface IErrorHelper<TData>

    Runtime helper returned by defineError()/r.error(). Contains helpers to throw typed errors and perform type-safe checks.

    interface IErrorHelper<TData extends DefaultErrorType = DefaultErrorType> {
        "[symbolError]": true;
        "[symbolFilePath]": string;
        httpCode?: number;
        id: string;
        meta: IErrorMeta;
        tags: TagType[];
        create(...args: ErrorThrowArgs<TData>): IRunnerError<TData>;
        is(error: unknown): error is IRunnerError<TData>;
        is(
            error: unknown,
            partialData: Partial<TData>,
        ): error is IRunnerError<TData>;
        new(...args: ErrorThrowArgs<TData>): IRunnerError<TData>;
        optional(): IOptionalDependency<IErrorHelper<TData>>;
        throw(...args: ErrorThrowArgs<TData>): never;
    }

    Type Parameters

    Index

    Properties

    "[symbolError]": true

    Brand symbol for runtime detection

    "[symbolFilePath]": string

    File path where this error was defined

    httpCode?: number

    Optional HTTP status code associated with this error helper

    id: string

    Unique id for registration and DI

    Metadata attached to this error

    tags: TagType[]

    Tags attached to this error

    Methods