Skip to content
New issue

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

feat: Raise meaningful exception when oauth callback times out #363

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mafrosis
Copy link

@mafrosis mafrosis commented Jul 8, 2024

I found that when timeout_seconds parameter is used, the code raises an exception such as:

  File "/usr/lib/python3.12/site-packages/google_auth_oauthlib/flow.py", line 520, in run_local_server
    authorization_response = wsgi_app.last_request_uri.replace("http", "https")
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'replace'

This PR adds a custom exception such that a caller can handle this case.

I'm unable to run the full nox suite locally, but it looks like nothing has broken. I'll make any changes needed when the CI tests run.

@mafrosis mafrosis requested review from a team as code owners July 8, 2024 01:56
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Jul 8, 2024
@westarle westarle assigned arithmetic1728 and unassigned westarle Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants