Skip to content

Commit c74d5f2

Browse files
authored
Merge pull request #496 from datacamp/bb/improve-error-reporting-api-worker
chore: check if api deploys
2 parents fd50fb0 + 329c55a commit c74d5f2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

api/controllers/WorkerController.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ module.exports = {
2727
})
2828
.catch(Sequelize.UniqueConstraintError, function (err) {
2929
console.log('Sequelize.UniqueConstraintError: ', err.errors);
30-
return res.send(409, err.errors);
30+
return res.send(409, [...err.errors, "Sequalize.UniqueConstraintError"]);
3131
}).catch(Sequelize.ValidationError, function (err) {
3232
console.log('Sequelize.ValidationError: ', err.errors);
33-
return res.send(400, err.errors);
33+
return res.send(400, [...err.errors, "Sequalize.ValidationError"]);
3434
}).catch(function(err){
3535
console.log(err.errors);
36-
return res.negotiate(err.errors);
36+
return res.negotiate([...err.errors, "Other"]);
3737
});
3838

3939
} else if (type === 'version') {

0 commit comments

Comments
 (0)