Module

x/drash/mod.ts>Errors.HttpError

A microframework for Deno's HTTP server with zero third-party dependencies
Go to Latest
class Errors.HttpError
extends Error
import { Errors } from "https://dotland.deno.dev/x/drash@v2.7.0/mod.ts";
const { HttpError } = Errors;

This class is for throwing errors in the request-resource-response lifecycle.

Constructors

new
HttpError(code: number, message?: string)

Construct an object of this class.

Properties

code: number

A property to hold the HTTP response code associated with this exception.