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

x/http_error/mod.ts>HttpErrorOptions

An error class for HTTP requests.
Go to Latest
interface HttpErrorOptions
implements ErrorOptions
import { type HttpErrorOptions } from "https://deno.land/x/http_error@0.6.0/mod.ts";

Options for initializing an HttpError.

Index Signatures

[key: string]: unknown

Properties

optional
name: string

The name of the error. Default based on error status.

optional
message: string
optional
status: number

The HTTP status associated with the error. Defaults to 500.

optional
expose: boolean

Determines if the error should be exposed in the response. Defaults to true for client error statuses and false for server error statuses.