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

x/netzo/deps/std/http/http_errors.ts>createHttpError

Deno-powered framework for building business web apps
Go to Latest
function createHttpError
Deprecated
Deprecated

(will be removed in 0.207.0) Use custom error classes instead.

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.

import { createHttpError } from "https://deno.land/x/netzo@0.3.91/deps/std/http/http_errors.ts";

Parameters

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