There's a number of places in the code where .json() is called on a Requests response, without first checking if it failed. If it fails, it's not going to parse as JSON. Instead, we usually get:
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I think it'd be nicer to instead raise the HTTP error code received, instead of the lack of a JSON object at char 0.
Does anyone have any objections to this change? Will there be nostalgia for line 1 column 1 (char 0)?
There's a number of places in the code where
.json()is called on a Requests response, without first checking if it failed. If it fails, it's not going to parse as JSON. Instead, we usually get:I think it'd be nicer to instead raise the HTTP error code received, instead of the lack of a JSON object at char 0.
Does anyone have any objections to this change? Will there be nostalgia for line 1 column 1 (char 0)?