diff --git a/jquantsapi/client.py b/jquantsapi/client.py index 1b9ba70..b54cd5d 100644 --- a/jquantsapi/client.py +++ b/jquantsapi/client.py @@ -230,7 +230,8 @@ def _get(self, url: str, params: Optional[dict] = None) -> requests.Response: headers = self._base_headers() ret = s.get(url, params=params, headers=headers, timeout=30) if ret.status_code == 400: - raise HTTPError(ret.status_code, ret.json()) + msg = f"{ret.status_code} for url: {ret.url} body: {ret.text}" + raise HTTPError(msg, response=ret) ret.raise_for_status() return ret