Skip to content

Library crashes on Too Many Requests response #20

@m-aciek

Description

@m-aciek

getUser throws hyperwallet.exceptions.HyperwalletAPIException: Invalid Content-Type specified in Response Header when Hyperwallet server internally returns Too Many Requests.

It could raise some catchable exception instead.

application_1       | Traceback (most recent call last):
application_1       |   File "/usr/local/lib/python3.7/site-packages/hyperwallet/api.py", line 117, in getUser
application_1       |     os.path.join('users', userToken)
application_1       |   File "/usr/local/lib/python3.7/site-packages/hyperwallet/utils/apiclient.py", line 156, in doGet
application_1       |     params=params
application_1       |   File "/usr/local/lib/python3.7/site-packages/hyperwallet/utils/apiclient.py", line 116, in _makeRequest
application_1       |     self.__checkResponseHeaderContentType(response)
application_1       |   File "/usr/local/lib/python3.7/site-packages/hyperwallet/utils/apiclient.py", line 208, in __checkResponseHeaderContentType
application_1       |     raise HyperwalletAPIException('Invalid Content-Type specified in Response Header')
application_1       | hyperwallet.exceptions.HyperwalletAPIException: Invalid Content-Type specified in Response Header

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions