Handling the case when the JSON response is null during an error

`jsonResp` seems to be null during 503 errors, and if it's not handled here then everything breaks later on.