From e89eaa5d08aababbd3401a85812e0cfb95d7a7b3 Mon Sep 17 00:00:00 2001 From: Swapnil Date: Tue, 30 Jan 2024 21:00:30 +0530 Subject: [PATCH] app: try better error in app --- app/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index d2e153c..eff76a9 100644 --- a/app/main.py +++ b/app/main.py @@ -169,7 +169,9 @@ def save_token(email, access_token, refresh_token, expiration_seconds): 'expiration_seconds': expiration_seconds } ) - response.raise_for_status() + # response.raise_for_status() + if response.status_code not in range(200, 300): + raise Exception(f'HTTPError: {response.status_code} \n Message: {response.json()}') return response.json().get('id')