bauerji / flask-pydantic

flask extension for integration with the awesome pydantic package
MIT License
368 stars 58 forks source link

return 400 for __root__ body model validation errors #36

Closed jcreekmore closed 3 years ago

jcreekmore commented 3 years ago

Instead of causing a 5xx error to be returned when root is in the body model when validation fails, catch that ValidationError and ship it through the 400 error handling code.

sonarcloud[bot] commented 3 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

bauerji commented 3 years ago

That's neat, @jcreekmore ! Thank you for contribution. It will be release in 0.8.0 version.