Conan packages: map validation errors to 400 Bad Request responses
🔥 Problem
In the Conan Repository packages API, validation errors can occurs.
For example, we could have a race condition on finding or create the package = one of the concurrent access will fail this validation.
The problem is that this validation error is currently mapped to a 500 Server error
response. This is not accurate as it is an expected error (that can happen). In addition, this contributes negatively to the Package Team error budget.
🚒 Solution
The validation errors should be mapped to a 400 Bad Request
response as it is a controlled error.