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

Handle 429 status code in response gracefully. #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

m-aciek
Copy link

@m-aciek m-aciek commented Sep 19, 2019

Closes #20.

@m-aciek
Copy link
Author

m-aciek commented Dec 2, 2019

@igusar-epam, @dyurchenko-epam could you take a look at it? That change would prevent us from internal library crash on internal check. And would allow us to not fork HW SDK, but use original one.

@m-aciek
Copy link
Author

m-aciek commented Dec 2, 2019

Now we just get:

hyperwallet.exceptions:HyperwalletAPIException: Invalid Content-Type specified in Response Header
Traceback (most recent call last):
...
File ".../hyperwallet/api.py", line 117, in getUser
File ".../hyperwallet/utils/apiclient.py", line 156, in doGet
File ".../hyperwallet/utils/apiclient.py", line 116, in _makeRequest
File ".../hyperwallet/utils/apiclient.py", line 208, in __checkResponseHeaderContentType

so the original cause is obscured.

@igusar-epam
Copy link
Contributor

@m-aciek I think this change is ok. I can approve this pull request if you add me as a reviewer. Also you can add @aseveryn-hw to this discussion. He has a lot more experience in SDK programming.

@m-aciek
Copy link
Author

m-aciek commented Dec 3, 2019

@igusar-epam thank you! But it looks like I don't have permissions to assign a review :( [1].

[1] https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/requesting-a-pull-request-review

@igusar-epam igusar-epam self-requested a review December 3, 2019 12:34
@igusar-epam
Copy link
Contributor

@m-aciek I added myself as a reviewer and approved it. I also added other team members to it.

@m-aciek
Copy link
Author

m-aciek commented Dec 16, 2019

@vkorotchenko @wmews-hw @aseveryn-hw what do you think of this small change?

hyperwallet/utils/apiclient.py Outdated Show resolved Hide resolved
hyperwallet/utils/apiclient.py Outdated Show resolved Hide resolved
@m-aciek m-aciek requested review from wmews-hw and removed request for aseveryn-hw July 21, 2020 11:53
@m-aciek
Copy link
Author

m-aciek commented Sep 23, 2020

@wmews-hw Hi, I've corrected my pull request. Could you take a look?

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.

Library crashes on Too Many Requests response
4 participants