Skip to main content
Go to Latest
function error
Deprecated
Deprecated

moved to the core:

import { Get } from 'darkflare'

Get({
...
}, c => {
return c.error('Access Denied')
})
import { error } from "https://deno.land/x/darkflare@v7.2.3/x/mod.ts";

Parameters

c: FetchContext
error:
| "ACCESS_DENIED"
| 403
| "BAD_REQUEST"
| 400
| "FORBIDDEN"
| "MALFORMED_REQUEST"
| "METHOD_NOT_ALLOWED"
| 405
| "NOT_FOUND"
| 404
| "PAYLOAD_TOO_LARGE"
| 413
| "SERVICE_UNAVAILABLE"
| 503
| "SOMETHING_WENT_WRONG"
| 500
| "UNAUTHORIZED"
| 401