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

x/attain/core/httpError.ts>HttpError

Deno API middleware Server
Latest
class HttpError
extends Error
import { HttpError } from "https://deno.land/x/attain@1.1.2/core/httpError.ts";

A base class for individual classes of HTTP errors.

Properties

expose: boolean

Determines if details about the error should be automatically exposed in a response. This is automatically set to true for 4XX errors, as they represent errors in the request, while 5XX errors are set to false as they are internal server errors and exposing details could leak important server security information.

status

The HTTP error status associated with this class of error.