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

Add headers parameter to HTTPException #1435

Merged
merged 3 commits into from Jan 26, 2022

Conversation

Kludex
Copy link
Sponsor Member

@Kludex Kludex commented Jan 26, 2022

Idea from @adriangb : #1434 (comment)

The PR #1434 created a use-case for HTTPException.headers. FastAPI already makes use of this, as mentioned by Adrian on https://github.com/tiangolo/fastapi/blob/291180bf2d8c39e84860c2426b1d58b6c80f6fef/fastapi/exceptions.py#L13 .

PR open for discussion. :)

@tomchristie
Copy link
Member

Seems pretty reasonable to me yeah.

@tomchristie
Copy link
Member

Needs a lil' docs update on https://www.starlette.io/exceptions/ - then I think it's ready to go.

Copy link
Member

@adriangb adriangb left a comment

Choose a reason for hiding this comment

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

This looks great! We should just test it against FastAPI first to at least know if it will be breaking for them. I don't think it will be.

starlette/exceptions.py Show resolved Hide resolved
@adriangb
Copy link
Member

This looks great! We should just test it against FastAPI first to at least know if it will be breaking for them. I don't think it will be.

Well I tried, a bunch of other things are broken. But just eyeballing the change, I don't see how it would break FastAPI. So I think we're good to go on this!

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.

None yet

4 participants