Skip to content

Commit

Permalink
easy debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
henryzhangpku committed Jun 27, 2023
1 parent ab04ebb commit d38dd61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions robin_stocks/robinhood/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ def request_post(url, payload=None, timeout=16, json=False, jsonify_data=True):
'Content-Type', 'application/x-www-form-urlencoded; charset=utf-8')
else:
res = SESSION.post(url, data=payload, timeout=timeout)
if res.status_code == 500:
raise ValueError("Received 500!")
if res.status_code in [500,400]:
raise Exception("Received "+ str(res.status_code))
data = res.json()
except Exception as message:
print("Error in request_post: {0}".format(message), file=get_output())
Expand Down

0 comments on commit d38dd61

Please sign in to comment.