Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/fsrouter/deps.ts>http.createHttpError

A file system based router for Deno.
Latest
function http.createHttpError
import { http } from "https://deno.land/x/fsrouter@3.1.0/deps.ts";
const { createHttpError } = http;

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 incudes the expose property to set the .expose value on the error.

Parameters

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