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

x/netzo/deps/std/http/http_errors.ts>errors

Deno-powered framework for building business web apps
Go to Latest
variable errors
Deprecated
Deprecated

(will be removed in 0.207.0) Use custom http/status.ts instead.

A namespace that contains each error constructor. Each error extends HTTPError and provides .status and .expose properties, where the .status will be an error Status value and .expose indicates if information, like a stack trace, should be shared in the response.

By default, .expose is set to false in server errors, and true for client errors.

import { errors } from "https://deno.land/x/netzo@0.3.91/deps/std/http/http_errors.ts";

Examples

Example 1

import { errors } from "https://deno.land/std@0.224.0/http/http_errors.ts";

throw new errors.InternalServerError("Ooops!");

type

Record<ErrorStatusKeys, HttpError>