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

x/oak_nest/mod.ts>Context#throw

Refer to nestjs to realize some common functions for Deno
Go to Latest
method Context.prototype.throw
Re-export
import { Context } from "https://deno.land/x/oak_nest@v1.13.15/mod.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