@vsokolov/utils - v0.32.0
    Preparing search index...

    Type Alias ErrorConstructor<E>

    ErrorConstructor: new (message: string, status?: number, cause?: unknown) => E

    Configuration options for the tryCatch function.

    Type Parameters

    • E extends Error

      The type of error class to use for error transformation

    // Basic configuration
    { defaultStatus: 400 }

    // With custom error class
    { ErrorClass: ApiError, defaultStatus: 500 }