MCPcopy Index your code
hub / github.com/github/docs / catchMiddlewareError

Function catchMiddlewareError

middleware/catch-middleware-error.js:1–3  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

1export default function catchMiddlewareError(fn) {
2 return (req, res, next) => Promise.resolve(fn(req, res, next)).catch(next)
3}

Callers 2

events.jsFile · 0.85
search.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected