import { Context } from "https://deno.land/x/deno_koa@v1.0.4/context.ts";
Throw an error with msg
and optional status
defaulting to 500. Note that these are user-level
errors, and the message may be exposed to the client.
this.throw(403) this.throw(400, 'name required') this.throw('something exploded') this.throw(new Error('invalid')) this.throw(400, new Error('invalid'))
Note: status
should only be passed as the first parameter.