Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/superdeno/test/deps.ts>Oak.Context#throw

Super-agent driven library for testing Deno HTTP servers.
Latest
method Oak.Context.prototype.throw
import { Oak } from "https://deno.land/x/superdeno@4.9.0/test/deps.ts";
const { Context } = Oak;

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