Skip to content

Library crashes on 404 response #35

@m-aciek

Description

@m-aciek

getBankAccount throws hyperwallet.exceptions.HyperwalletAPIException: Invalid Content-Type specified in Response Header when Hyperwallet server internally returns 404 - Not Found.

It could raise some catchable exception instead.

Traceback (most recent call last):
  File "…", line …, in …
    ….getBankAccount(
  File "/usr/local/lib/python3.8/site-packages/hyperwallet/api.py", line 275, in getBankAccount
    response = self.apiClient.doGet(
  File "/usr/local/lib/python3.8/site-packages/hyperwallet/utils/apiclient.py", line 153, in doGet
    return self._makeRequest(
  File "/usr/local/lib/python3.8/site-packages/hyperwallet/utils/apiclient.py", line 116, in _makeRequest
    self.__checkResponseHeaderContentType(response)
  File "/usr/local/lib/python3.8/site-packages/hyperwallet/utils/apiclient.py", line 210, in __checkResponseHeaderContentType
    raise HyperwalletAPIException('Invalid Content-Type specified in Response Header')
hyperwallet.exceptions.HyperwalletAPIException: Invalid Content-Type specified in Response Header

Similar case to #20.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions