Skip to content
This repository has been archived by the owner on Mar 15, 2020. It is now read-only.

Adding headers to HTTPError #335

Closed

Conversation

teaglebuilt
Copy link

**In Response to Issue #275 **
Issue #275

I wanted to see if this is what you had in mind? I also read the link regarding the issue about adding to HTTPException and abondoning HTTPError?
#507

If you noticed I just added the headers to HTTPError and the handlers. I wanted to see which direction you are referring to?

@teaglebuilt teaglebuilt changed the title push across fork Adding headers to HTTPError Oct 3, 2019
@@ -46,6 +48,7 @@
```
"""
res.status_code = exc.status_code
res.headers = exc.headers
Copy link
Member

Choose a reason for hiding this comment

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

I think some of the tests failing in CI come from this line. We shouldn’t set response headers if exc.headers is None. :)

Copy link
Author

Choose a reason for hiding this comment

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

oh duh its optional, ill change that. well what about adding it to slots?

Copy link
Author

@teaglebuilt teaglebuilt Oct 4, 2019

Choose a reason for hiding this comment

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

__slots__ = (status, detail, headers ) 

Since headers is optional I figured it would not be included

Copy link
Member

Choose a reason for hiding this comment

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

We can certainly add it, yes.

@florimondmanca
Copy link
Member

Yup, I think this is the way I initially thought about this. :)

@florimondmanca
Copy link
Member

@teaglebuilt Bocadillo has now entered unmaintained state, as per #334. I'm closing this PR as a result. Thanks for your interest. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants