Describe the solution you'd like
The handling for validation and errors should be unified. Its a bad practise to keep them inside the endpoints methods. They should be extracted to validation classes.
Every validation error that's thrown inside validator should raise an exception. This exception should result in a 400 Bad Request http status response code.
Additional context
Nothing by now.
Describe the solution you'd like
The handling for validation and errors should be unified. Its a bad practise to keep them inside the endpoints methods. They should be extracted to validation classes.
Every validation error that's thrown inside validator should raise an exception. This exception should result in a 400 Bad Request http status response code.
Additional context
Nothing by now.