GIScience/ohsome-py

Error causing retry is obscured if max-retry is hit

Closed this issue · 0 comments

The retry strategy works well but once it fails will obscure the error that caused the retry and only send a

    "status": null,
    "message": "HTTPSConnectionPool(host='api-internal.ohsome.org', port=443): Max retries exceeded with url: /v1//elements/geometry (Caused by ResponseError('too many 500 error responses'))",

which is not very helpful for the user and can hinder debugging. Logging the failure of the retry and returning the actual error to the user would be preferable.