Skip to content

Commit

Permalink
fix: handle broader request exceptions in OAuth process
Browse files Browse the repository at this point in the history
Signed-off-by: -LAN- <[email protected]>
  • Loading branch information
laipz8200 committed Dec 23, 2024
1 parent c1aa55f commit b33ffa4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/controllers/console/auth/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def get(self, provider: str):
try:
token = oauth_provider.get_access_token(code)
user_info = oauth_provider.get_user_info(token)
except requests.exceptions.HTTPError as e:
except requests.exceptions.RequestException as e:
logging.exception(f"An error occurred during the OAuth process with {provider}: {e.response.text}")
return {"error": "OAuth process failed"}, 400

Expand Down

0 comments on commit b33ffa4

Please sign in to comment.