소스 검색

fix: handle broader request exceptions in OAuth process (#11997)

Signed-off-by: -LAN- <laipz8200@outlook.com>
tags/0.14.2
-LAN- 10 달 전
부모
커밋
03548cdfbc
No account linked to committer's email address
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      api/controllers/console/auth/oauth.py

+ 1
- 1
api/controllers/console/auth/oauth.py 파일 보기

@@ -76,7 +76,7 @@ class OAuthCallback(Resource):
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


Loading…
취소
저장