actual-server/util/error-middleware.js
Jared Gharib 3fee9cbb42 fix: error handling middleware signature
Error handling middleware functions must have four arguments to
identify it as such.

Fixes #40
2022-05-28 23:16:46 -04:00

7 lines
181 B
JavaScript

async function middleware(err, req, res, next) {
console.log('ERROR', err);
res.status(500).send({ status: 'error', reason: 'internal-error' });
}
module.exports = middleware;