Use correct JSON decode exception
requests.exceptions.JSONDecodeError is non existent in requests versions before 3.0.0. Therefore requests is pinned to 2.24 or greater, and we use ValueError instead of requests.exceptions.JSONDecodeError.
requests.exceptions.JSONDecodeError is non existent in requests versions before 3.0.0. Therefore requests is pinned to 2.24 or greater, and we use ValueError instead of requests.exceptions.JSONDecodeError.