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

x/hex/src/fw/service/deps.ts>oak.HttpError

An ecosystem delivering practices, philosophy and portability. Powered By Deno and JavaScript.
Go to Latest
class oak.HttpError
extends Error
import { oak } from "https://deno.land/x/hex@0.6.3/src/fw/service/deps.ts";
const { HttpError } = oak;

The base class that all derivative HTTP extend, providing a status and an expose property.

Constructors

new
HttpError(message?, options?: HttpErrorOptions)

Properties

readonly
expose: boolean

A flag to indicate if the internals of the error, like the stack, should be exposed to a client, or if they are "private" and should not be leaked. By default, all client errors are true and all server errors are false.

readonly
headers: Headers | undefined

The optional headers object that is set on the error.

readonly
status: ErrorStatus

The error status that is set on the error.