Skip to content

HonoHttpException

src/HonoHttpException.res
type t

src/HonoHttpException.res:1:1


src/HonoHttpException.res
type options = {
message: string,
cause: RescriptCore.Error.t,
}

src/HonoHttpException.res:2:1


src/HonoHttpException.res
let httpException: (int, options) => t

Creates a new HTTP exception instance for handling HTTP errors in Hono applications.

@param status - The HTTP status code for the exception (e.g., 400, 404, 500)
@param options - Configuration object containing error details
@param options.message - Human-readable error message describing the exception
@param options.cause - The underlying Error object that caused this HTTP exception
@returns A new HTTPException instance that can be thrown or handled by Hono middleware

src/HonoHttpException.res:7:1


src/HonoHttpException.res
let httpException: (int, options) => t

src/HonoHttpException.res:19:5