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

x/danet/src/deps.ts>Context#throw

A Savory web framework for Deno heavily inspired by Nest
Go to Latest
method Context.prototype.throw
import { Context } from "https://deno.land/x/danet@1.3.3/src/deps.ts";

Create and throw an HTTP Error, which can be used to pass status information which can be caught by other middleware to send more meaningful error messages back to the client. The passed error status will be set on the .response.status by default as well.

Parameters

errorStatus: ErrorStatus
optional
message: string
optional
props: Record<string, unknown>

Returns

never