MCPcopy Create free account
hub / github.com/coordinape/coordinape / handlerSafe

Function handlerSafe

api-lib/handlerSafe.ts:10–19  ·  view source on GitHub ↗
(handler: AsyncVercelApiHandler)

Source from the content-addressed store, hash-verified

8) => Promise<VercelResponse | void>;
9
10export const handlerSafe = (handler: AsyncVercelApiHandler) => {
11 return async (req: VercelRequest, res: VercelResponse) => {
12 try {
13 await handler(req, res);
14 await sentryFlush();
15 } catch (error: any) {
16 return errorResponse(res, error);
17 }
18 };
19};

Callers 6

login.tsFile · 0.90
callback.tsFile · 0.90
login.tsFile · 0.90
callback.tsFile · 0.90
callback.tsFile · 0.90

Calls 3

sentryFlushFunction · 0.90
errorResponseFunction · 0.90
handlerFunction · 0.50

Tested by

no test coverage detected