Separate services - app, db, and job #1
|
@ -182,7 +182,12 @@ def set_session_token_id(token_id):
|
|||
|
||||
def raise_for_status(response):
|
||||
if response.status_code not in range(200, 300):
|
||||
raise Exception(f'HTTPError: {response.status_code} \n Message: {response.json()}')
|
||||
msg = None
|
||||
try:
|
||||
msg = response.json().get('error', '')
|
||||
except:
|
||||
pass
|
||||
raise Exception(f'HTTPError: {response.status_code} \n Message: {msg}')
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host='0.0.0.0', debug=True, port=5000)
|
Loading…
Reference in New Issue
Block a user