Skip to content

Commit 8b57d27

Browse files
authored
Merge pull request #497 from datacamp/bb/check-api-deploy
chore: check api deploy
2 parents c74d5f2 + 2959b42 commit 8b57d27

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

api/controllers/WorkerController.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ module.exports = {
2626
res.json(value);
2727
})
2828
.catch(Sequelize.UniqueConstraintError, function (err) {
29-
console.log('Sequelize.UniqueConstraintError: ', err.errors);
30-
return res.send(409, [...err.errors, "Sequalize.UniqueConstraintError"]);
29+
console.log('SequelizeError: UniqueConstraintError: ', err.errors);
30+
return res.send(409, err.errors);
3131
}).catch(Sequelize.ValidationError, function (err) {
32-
console.log('Sequelize.ValidationError: ', err.errors);
33-
return res.send(400, [...err.errors, "Sequalize.ValidationError"]);
32+
console.log('SequelizeError: ValidationError: ', err.errors);
33+
return res.send(400, err.errors);
3434
}).catch(function(err){
3535
console.log(err.errors);
3636
return res.negotiate([...err.errors, "Other"]);

0 commit comments

Comments
 (0)