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.
Right now, we are using
json.JSONDecodeError
, but depending on Python version,json.JSONDecodeError
,simplejson.JSONDecodeError
,ValueError
,requests.JSONDecodeError
, orrequests.RequestException
, could be sent from the request. All 5 types are captured byrequests.JSONDecodeError
, so let's use this to give more informative errors.