8000 Fix empty message about raised exception by manlix · Pull Request #1815 · fastapi/fastapi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty message about raised exception #1815

Merged
merged 1 commit into from
Aug 9, 2020
Merged

Fix empty message about raised exception #1815

merged 1 commit into from
Aug 9, 2020

Conversation

manlix
Copy link
Contributor
@manlix manlix commented Jul 30, 2020

Fix for issue in documentation example code #1814

@codecov
Copy link
codecov bot commented Jul 30, 2020

Codecov Report

Merging #1815 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##            master     #1815    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          235       235            
  Lines         6989      6833   -156     
==========================================
- Hits          6989      6833   -156     
Impacted Files Coverage Δ
tests/test_path.py 100.00% <0.00%> (ø)
tests/test_query.py 100.00% <0.00%> (ø)
tests/test_fakeasync.py 100.00% <0.00%> (ø)
tests/test_application.py 100.00% <0.00%> (ø)
tests/test_params_repr.py 100.00% <0.00%> (ø)
tests/test_empty_router.py 100.00% <0.00%> (ø)
tests/test_router_events.py 100.00% <0.00%> (ø)
tests/test_openapi_servers.py 100.00% <0.00%> (ø)
tests/test_security_oauth2.py 100.00% <0.00%> (ø)
tests/test_dependency_class.py 100.00% <0.00%> (ø)
... and 56 more

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 a63b1ef...df17f57. Read the comment docs.

@github-actions
Copy link
Contributor

📝 Docs preview for commit df17f57 at: https://5f22e34b127c7c469e7479bd--fastapi.netlify.app

Copy link
Member
@Kludex Kludex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have the same problem on next exception handler (RequestValidationError)?

But nice catch! 🎉

@manlix
Copy link
Contributor Author
manlix commented Jul 30, 2020

Do we have the same problem on next exception handler (RequestValidationError)?

But nice catch!

@Kludex No, we don't. Next exception handler is correct:

manlix@lab:~$ curl http://localhost:8000/items/incorrect
{"detail":[{"loc":["path","item_id"],"msg":"value is not a valid integer","type":"type_error.integer"}]}

Output in logs has expected details in plain text:

OMG! The client sent invalid data!: 1 validation error for Request
path -> item_id
  value is not a valid integer (type=type_error.integer)
INFO:     127.0.0.1:50902 - "GET /items/incorrect HTTP/1.1" 422 Unprocessable Entity

@tiangolo tiangolo merged commit 0752c72 into fastapi:master Aug 9, 2020
@tiangolo
Copy link
Member
tiangolo commented Aug 9, 2020

Awesome, good catch @manlix ! 🚀 🍰

Thanks for the help @Kludex ! ☕

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.

3 participants
0