Skip to content

Commit

Permalink
指摘反映 (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-meitoma authored Apr 7, 2023
1 parent 3ab9845 commit f5bd537
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jquantsapi/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f5bd537

Please sign in to comment.