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

Allow extra headers in HTTPError #275

Closed
florimondmanca opened this issue May 11, 2019 · 2 comments
Closed

Allow extra headers in HTTPError #275

florimondmanca opened this issue May 11, 2019 · 2 comments
Labels
easy picker Good for newcomers enhancement New feature or improvement of an existing one

Comments

@florimondmanca
Copy link
Member

Is your feature request related to a problem? Please describe.
We may want to send extra headers along with the response when an HTTP error occurs — particularly when dealing with authentication. We cannot do so currently without writing a custom error handler that would define the format of the response (plain text, JSON, …).

Describe the solution you'd like
Add a headers parameter to HTTPError, which users/clients can use to define extra headers to be sent with the response.

Describe alternatives you've considered

Implementation ideas
We'll need to update the base error handlers (error_to_text, errorto_json`, etc) to send the extra headers with the response.

Additional context
/

@florimondmanca florimondmanca added easy picker Good for newcomers enhancement New feature or improvement of an existing one labels May 11, 2019
@teaglebuilt
Copy link

is this feature still open?

@florimondmanca
Copy link
Member Author

florimondmanca commented Oct 1, 2019

Hi @teaglebuilt,

Despite #334, yes it is (for now!). I would gladly review a PR to implement this piece of functionality. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
easy picker Good for newcomers enhancement New feature or improvement of an existing one
Projects
None yet
Development

No branches or pull requests

2 participants