Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

🐛FixRuntimeError raised whenHTTPException has a status code with no content#5365

Merged
tiangolo merged 8 commits intofastapi:masterfrom
iudeen:fix/http-exception-no-content-error
Sep 11, 2022
Merged

🐛FixRuntimeError raised whenHTTPException has a status code with no content#5365
tiangolo merged 8 commits intofastapi:masterfrom
iudeen:fix/http-exception-no-content-error

Conversation

@iudeen
Copy link
Contributor

@iudeeniudeen commentedSep 8, 2022
edited by tiangolo
Loading

Fixes/related to#4949 (comment)

Please advice if this approach is correct one.

Suggestions welcome!

tiangolo reacted with rocket emoji
@codecov
Copy link

codecovbot commentedSep 8, 2022
edited
Loading

Codecov Report

Merging#5365 (1fe25cf) intomaster (6620273) willnot change coverage.
The diff coverage is100.00%.

@@            Coverage Diff            @@##            master     #5365   +/-   ##=========================================  Coverage   100.00%   100.00%           =========================================  Files          540       540             Lines        13936     13951   +15     =========================================+ Hits         13936     13951   +15
Impacted FilesCoverage Δ
fastapi/exception_handlers.py100.00% <100.00%> (ø)
tests/test_starlette_exception.py100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell ushow you rate us. Have a feature suggestion?Share it here.

@github-actions
Copy link
Contributor

📝 Docs preview for commitafecf9b at:https://631a48f65533fb0233157a85--fastapi.netlify.app

@github-actions
Copy link
Contributor

📝 Docs preview for commitf96a078 at:https://631a4cce339597069b76e096--fastapi.netlify.app

@github-actions
Copy link
Contributor

📝 Docs preview for commitc357017 at:https://631a4e7d882b77006ea53e5b--fastapi.netlify.app

@iudeeniudeen changed the titlefix: handle no body status codes in HTTPExceptions 🐛Fix Handle HTTPExceptions with status codes that should not support bodySep 8, 2022
@iudeeniudeen changed the title 🐛Fix Handle HTTPExceptions with status codes that should not support body 🐛Fix RuntimeError that got raised when HTTPExceptions with status codes that should not support body was raisedSep 8, 2022
Copy link
Member

@KludexKludex left a comment

Choose a reason for hiding this comment

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

iudeen reacted with laugh emojitiangolo reacted with heart emojitiangolo reacted with rocket emoji
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
@iudeen
Copy link
ContributorAuthor

iudeen commentedSep 8, 2022
edited
Loading

Yep, same idea as what we have in Starlette:https://github.com/encode/starlette/blob/bc61505faef15b673bf4bf65db4927daa354d6b8/starlette/middleware/exceptions.py#L99-L104

I was able to find the bug by adding debug points toExceptionMiddleware while running the app usingFastAPI andStarlette in parallel.

And thus, the code was referred from Starlette! (Sorry, should have mentioned)

@github-actions
Copy link
Contributor

📝 Docs preview for commitf26af44 at:https://631a5fedd66a3a17d38dcc68--fastapi.netlify.app

@github-actions
Copy link
Contributor

📝 Docs preview for commitfda6d88 at:https://631a9d31d66a3a47438dc97b--fastapi.netlify.app

Copy link
Contributor

@JarroVGITJarroVGIT left a comment

Choose a reason for hiding this comment

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

LGTM

iudeen reacted with laugh emoji
@tiangolotiangolo changed the title 🐛Fix RuntimeError that got raised when HTTPExceptions with status codes that should not support body was raised 🐛FixRuntimeError raised whenHTTPException has a status code with no contentSep 11, 2022
@tiangolo
Copy link
Member

Awesome, thanks for the fix@iudeen! 🍰 🚀

And thanks for the reviews and comments@Kludex,@JarroVGIT,@BilalAlpaslan 🙇 ☕

Kludex and iudeen reacted with thumbs up emoji

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

Reviewers

@KludexKludexKludex approved these changes

+2 more reviewers

@JarroVGITJarroVGITJarroVGIT approved these changes

@BilalAlpaslanBilalAlpaslanBilalAlpaslan approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@iudeen@tiangolo@Kludex@JarroVGIT@BilalAlpaslan

Comments


[8]ページ先頭

©2009-2026 Movatter.jp