Pinned Loading
-
-
-
-
-
-
Allows you to wrap your express asyn...
Allows you to wrap your express async handlers in a way that removes the need to put all your function body handlers in a try catch phrase. Instead, if an error is thrown, it returns a default response from the server 1import { Request, Response, NextFunction } from 'express';
23type ExpressRouteFn<T> = (req: Request & Partial<T>, res: Response, next: NextFunction) => unknown;
45export function wrapper<T = {}>(fn: ExpressRouteFn<T>): ExpressRouteFn<T> {
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.