actual-server/util/error-middleware.js

7 lines
181 B
JavaScript
Raw Normal View History

2022-03-31 17:19:08 +00:00
async function middleware(err, req, res, next) {
console.log('ERROR', err);
res.status(500).send({ status: 'error', reason: 'internal-error' });
}
module.exports = middleware;