fix: error handling middleware signature

Error handling middleware functions must have four arguments to
identify it as such.

Fixes #40
This commit is contained in:
Jared Gharib 2022-05-21 21:17:20 +10:00 committed by James Long
parent a2a460a883
commit 3fee9cbb42

View file

@ -1,4 +1,4 @@
async function middleware(err, req, res) {
async function middleware(err, req, res, next) {
console.log('ERROR', err);
res.status(500).send({ status: 'error', reason: 'internal-error' });
}