Skip to content

Conversation

@dmontagu
Copy link
Collaborator

@dmontagu dmontagu commented Nov 28, 2019

Applies jsonable_encoder to pydantic error output in case the context is not JSON serializable.

Closes #743

@codecov
Copy link

codecov bot commented Nov 28, 2019

Codecov Report

Merging #748 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #748   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files         276    276           
  Lines        7201   7208    +7     
=====================================
+ Hits         7201   7208    +7
Impacted Files Coverage Δ
fastapi/exception_handlers.py 100% <100%> (ø) ⬆️
tests/test_multi_body_errors.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc4c13e...d2ab6db. Read the comment docs.

@dmontagu dmontagu force-pushed the error-serialization branch from 9e01d8a to 80ba6e0 Compare November 28, 2019 21:03
@dmontagu
Copy link
Collaborator Author

@tiangolo something seems wrong with the CI -- my first submission of this PR had a failing test (and failed code coverage) and it still "passed all checks".

@dmontagu dmontagu force-pushed the error-serialization branch 4 times, most recently from 9c2d07c to d2ab6db Compare November 28, 2019 21:08
@tiangolo tiangolo merged commit 19c77e3 into fastapi:master Nov 29, 2019
@tiangolo
Copy link
Member

Thanks @dmontagu ! 🚀 🍰


About the CI, I thought it was some temporal issue with Travis, I hadn't found any info about it yet. Because the builds still ran on Travis, although they weren't reported here.

But I just checked again, and it seems to be part of a migration from travis-ci.org to travis-ci.com: https://docs.travis-ci.com/user/migrate/open-source-on-travis-ci-com

I created this PR mainly to test it and it seems it's finally working correctly: #749

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid Constrained Decimals (condecimal) cause 500 response code, rather than a 422 with explanation of what was invalid.

2 participants