We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
login
The issue presents here: https://github.com/cal-itp/benefits/blob/main/benefits/oauth/views.py#L77
if result and result.status_code >= 400: exception = Exception(f"authorize_redirect error response [{result.status_code}]: {result.content.decode()}") elif result is None: exception = Exception("authorize_redirect returned None")
The elif condition only checks result but does not look at exception.
elif
result
exception
The problem is, the previous line may have already caught and set exception: https://github.com/cal-itp/benefits/blob/main/benefits/oauth/views.py#L73
try: result = oauth_client.authorize_redirect(request, redirect_uri) except Exception as ex: exception = ex
Thus, that original exception would be overwritten by exception = Exception("authorize_redirect returned None") which isn't necessarily true.
exception = Exception("authorize_redirect returned None")
Steps to reproduce the behavior:
ClaimsProvider
The original exception is not overwritten and is the one that gets bubbled further.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The issue presents here: https://github.com/cal-itp/benefits/blob/main/benefits/oauth/views.py#L77
The
elif
condition only checksresult
but does not look atexception
.The problem is, the previous line may have already caught and set
exception
: https://github.com/cal-itp/benefits/blob/main/benefits/oauth/views.py#L73Thus, that original
exception
would be overwritten byexception = Exception("authorize_redirect returned None")
which isn't necessarily true.To Reproduce
Steps to reproduce the behavior:
ClaimsProvider
with bad scheme etc.Expected behavior
The original exception is not overwritten and is the one that gets bubbled further.
The text was updated successfully, but these errors were encountered: