Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/oak_commons/http_errors.ts>createHttpError

A set of APIs for handling HTTP and HTTPS requests with Deno 🐿️ 🦕
Very Popular
Go to Latest
function createHttpError
import { createHttpError } from "https://deno.land/x/oak_commons@0.4.0/http_errors.ts";

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