Skip to content

Commit

Permalink
fix: the exception associated with a misconfigured
Browse files Browse the repository at this point in the history
ClaimsProvider (oauth_client.authorize_redirect throws an exception)
is not overwritten and is the one that gets bubbled further.
  • Loading branch information
lalver1 committed Feb 14, 2025
1 parent 7498961 commit ce23ad1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benefits/oauth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def login(request):

if result and result.status_code >= 400:
exception = Exception(f"authorize_redirect error response [{result.status_code}]: {result.content.decode()}")
elif result is None:
elif result is None and exception is None:
exception = Exception("authorize_redirect returned None")

if exception:
Expand Down

0 comments on commit ce23ad1

Please sign in to comment.