rstudio / pins-python

https://rstudio.github.io/pins-python/
MIT License
46 stars 10 forks source link

use `requests.JSONDecodeError` to catch more requests errors #232

Closed isabelizimm closed 2 months ago

isabelizimm commented 2 months ago

Right now, we are using json.JSONDecodeError, but depending on Python version, json.JSONDecodeError, simplejson.JSONDecodeError, ValueError, requests.JSONDecodeError, or requests.RequestException, could be sent from the request. All 5 types are captured by requests.JSONDecodeError, so let's use this to give more informative errors.