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

Function logException

middleware/handle-errors.js:22–29  ·  view source on GitHub ↗
(error, req)

Source from the content-addressed store, hash-verified

20}
21
22async function logException(error, req) {
23 if (process.env.NODE_ENV !== 'test' && shouldLogException(error)) {
24 await FailBot.report(error, {
25 path: req.path,
26 url: req.url,
27 })
28 }
29}
30
31export default async function handleError(error, req, res, next) {
32 const responseDone = res.headersSent || req.aborted

Callers 1

handleErrorFunction · 0.85

Calls 1

shouldLogExceptionFunction · 0.85

Tested by

no test coverage detected