google-auth-library-python-oauthlib
google-auth-library-python-oauthlib copied to clipboard
feat: Raise meaningful exception when oauth callback times out
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.