man-c / pycoingecko

Python wrapper for the CoinGecko API
MIT License
1.05k stars 272 forks source link

Fix unbound local exception on GET request failure #25

Closed yitzikc closed 3 years ago

yitzikc commented 3 years ago

This fix resolves unbound local errors when GET requests fail without returning a response (e.g. timeout). By raising a Requests exception, external recovery logic that expects that can handle the error, e.g. retry the request.

man-c commented 3 years ago

Great! Thanks for contributing! I will further test the exceptions behavior now and release a new version.