Instead of returning a HTTP 500 error, the API now returns a proper HTTP 400 Bad Request when a user submits a comparison with an invalid score_max.
The comparison UI is able to display the error messages from the API, so I translated the messages to make them match the front end UI language. As long as the front end correctly sets the score_max of each criterion these messages shouldn't be displayed to the users.
Checklist
[x] I added the related issue(s) id in the related issues section (if any)
if not, delete the related issues section
[x] I described my changes and my decisions in the PR description
[x] I read the development guidelines of the CONTRIBUTING.md
[x] The tests pass and have been updated if relevant
related issues #2001
Description
Instead of returning a HTTP 500 error, the API now returns a proper HTTP 400 Bad Request when a user submits a comparison with an invalid
score_max
.The comparison UI is able to display the error messages from the API, so I translated the messages to make them match the front end UI language. As long as the front end correctly sets the
score_max
of each criterion these messages shouldn't be displayed to the users.Checklist