MCPcopy Create free account
hub / github.com/Silentely/eSIM-Tools / asyncHandler

Function asyncHandler

src/js/middleware/validation.js:142–146  ·  view source on GitHub ↗

* Error boundary wrapper for async route handlers

(fn)

Source from the content-addressed store, hash-verified

140 * Error boundary wrapper for async route handlers
141 */
142function asyncHandler(fn) {
143 return (req, res, next) => {
144 Promise.resolve(fn(req, res, next)).catch(next);
145 };
146}
147
148/**
149 * Validate JSON body

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected