Deprecated
(will be removed in 0.207.0) Use custom error classes instead.
The base class that all derivative HTTP extend, providing a status
and an
expose
property.
import { HttpError } from "https://deno.land/x/netzo@0.3.91/deps/std/http/http_errors.ts";
Constructors
new
HttpError(message?, options?: HttpErrorOptions)Properties
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 | undefinedThe optional headers object that is set on the error.
readonly
status: ErrorStatusThe error status that is set on the error.