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

Getting HTTP Error 406 when getting bounces #185

Closed
arielnoname opened this issue Jul 1, 2016 · 2 comments
Closed

Getting HTTP Error 406 when getting bounces #185

arielnoname opened this issue Jul 1, 2016 · 2 comments
Labels
status: help wanted requesting help from the community type: bug bug in the library

Comments

@arielnoname
Copy link

Issue Summary

When I do: response = sg.client.suppression.bounces.get()
I get HTTP Error 406: NOT ACCEPTABLE in the console
Doesn't happen getting invalid emails, for example.

Technical details:

  • sendgrid-python Version: master (latest commit: [commit number])
  • Python Version: 2.7.11
@thinkingserious
Copy link
Contributor

Hello @arielnoname,

I found the bug, we need to set the header "Accept" to be "application/json".

A workaround until we fix it is:

headers = {'Accept': 'application/json'}
response = sg.client.suppression.bounces.get(request_headers=headers)

Thanks!

@thinkingserious thinkingserious added type: bug bug in the library status: help wanted requesting help from the community labels Jul 1, 2016
@thinkingserious
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: help wanted requesting help from the community type: bug bug in the library
Projects
None yet
Development

No branches or pull requests

2 participants