Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix empty message about raised exception#1815

Merged
tiangolo merged 1 commit into
fastapi:masterfrom
manlix:handling_errors
Aug 9, 2020
Merged

Fix empty message about raised exception#1815
tiangolo merged 1 commit into
fastapi:masterfrom
manlix:handling_errors

Conversation

@manlix

@manlix manlix commented Jul 30, 2020

Copy link
Copy Markdown
Contributor

Fix for issue in documentation example code #1814

@codecov

codecov Bot commented Jul 30, 2020

Copy link
Copy Markdown

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
Copy Markdown
Contributor

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

@Kludex Kludex left a comment

Copy link
Copy Markdown
Member

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

manlix commented Jul 30, 2020

Copy link
Copy Markdown
Contributor Author

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

tiangolo commented Aug 9, 2020

Copy link
Copy Markdown
Member

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