Type Alias BaseException<T>

BaseException<T>: {
    [TO_RESPONSE]: (() => NextResponse<T>);
}

A base interface for representing known application exceptions which should be sent to the client when thrown.

Type Parameters

  • T = unknown

Type declaration

  • [TO_RESPONSE]: (() => NextResponse<T>)

    A function that converts this exception to a next/server#NextResponse containing information about the exception.

      • (): NextResponse<T>
      • Returns NextResponse<T>