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:
parent
a2a460a883
commit
3fee9cbb42
1 changed files with 1 additions and 1 deletions
|
@ -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' });
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue