Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/oak_http_proxy/test/deps.ts>Oak.createHttpError

Proxy middleware for Deno Oak HTTP servers. 🐿 🦕
Latest
function Oak.createHttpError
import { Oak } from "https://deno.land/x/oak_http_proxy@2.3.0/test/deps.ts";
const { createHttpError } = Oak;

A factory function which provides a way to create errors. It takes up to 3 arguments, the error Status, an message, which defaults to the status text and error options, which includes the expose property to set the .expose value on the error.

Parameters

optional
status: ErrorStatus = [UNSUPPORTED]
optional
message: string
optional
options: HttpErrorOptions