actual-server/util/error-middleware.js

7 lines
182 B
JavaScript
Raw Normal View History

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