server deps major updates 2

This commit is contained in:
smart_ex 2022-07-04 20:23:41 +10:00
parent 9a0e3952ce
commit e8e1384b65
2 changed files with 561 additions and 358 deletions

View File

@ -23,7 +23,11 @@ function createServer() {
server.setErrorHandler((error, req, res) => {
req.log.error(error.toString());
res.code(500).send({ error: error.toString() });
let statusCode = 500;
if ('validation' in error) {
statusCode = 400;
}
res.code(statusCode).send({ error: error.toString() });
});
return server;
}

913
yarn.lock

File diff suppressed because it is too large Load Diff