Validation errors that make it past Hapi, but trigger a sequelize error, currently result in a 500 Internal Server Error response with no additional feedback to the user.
Database errors should thus be handled more gracefully, providing additional information about what went wrong (with an appropriate status code, e.g. 400).
Tasks
[ ] Catch database errors before responses and check for sequelize validation errors
[ ] Return appropriate responses instead of status code 500
Validation errors that make it past Hapi, but trigger a sequelize error, currently result in a
500 Internal Server Error
response with no additional feedback to the user. Database errors should thus be handled more gracefully, providing additional information about what went wrong (with an appropriate status code, e.g. 400).Tasks