(error, req)
| 20 | } |
| 21 | |
| 22 | async 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 | |
| 31 | export default async function handleError(error, req, res, next) { |
| 32 | const responseDone = res.headersSent || req.aborted |
no test coverage detected