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

x/deno_nest/modules/uinv/mod.ts>anyExceptionFilter

Refer to nestjs to realize some common functions for Deno, support hono and oak
Go to Latest
variable anyExceptionFilter
import { anyExceptionFilter } from "https://deno.land/x/deno_nest@v3.3.1/modules/uinv/mod.ts";

A middleware that will deal the exceptions when called, and set the response time for other middleware in milliseconds as X-Response-Time which can be used for diagnostics and other instrumentation of an application. Utilise the middleware before the "real" processing occurs.

import { anyExceptionFilter } from "https://deno.land/x/deno_nest/modules/uinv/mod.ts";

app.use(anyExceptionFilter({
 logger: console,
 isDisableFormat404: true,
 isLogCompleteError: true,
 isIgnoreLog401: true,
}));

type

(options?: ExceptionOptions) => unknown