diff --git a/gamdl/utils.py b/gamdl/utils.py index eefa67f..70e7be9 100644 --- a/gamdl/utils.py +++ b/gamdl/utils.py @@ -14,11 +14,11 @@ def raise_for_status(httpx_response: httpx.Response, valid_responses: set[int] = ) -def safe_json(httpx_response: httpx.Response) -> dict: +def safe_json(httpx_response: httpx.Response) -> dict | None: try: return httpx_response.json() except (json.JSONDecodeError, UnicodeDecodeError): - return {} + return None async def get_response(