Skip to main content
Module

x/dactyl/deps.ts>Context#throw

Web framework for Deno, built on top of Oak 🦇
Latest
method Context.prototype.throw
import { Context } from "https://deno.land/x/dactyl@v0.1.0-alpha/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: object

Returns

never