MCPcopy
hub / github.com/koajs/koa / onerror

Method onerror

lib/application.js:201–201  ·  view source on GitHub ↗
(err)

Source from the content-addressed store, hash-verified

199 const res = ctx.res
200 res.statusCode = 404
201 const onerror = (err) => ctx.onerror(err)
202 const handleResponse = () => respond(ctx)
203 onFinished(res, onerror)
204 return fnMiddleware(ctx).then(handleResponse).catch(onerror)

Callers 3

respondFunction · 0.80
onerror.test.jsFile · 0.80
onerror.test.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected