timeouts are not set in requests inside a custom authentication flow #3679
Unanswered
scratchmex
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
the problem is that whenever I have a custom authentication that yields some requests, those requests does not have a timeout set. sometimes the underlying authentication flow stalls the whole request.
see the
timeout=None
hereciting the documentation on timeouts
I am raising this as suggested by the bug template but I think it's definitely a bug.
I know the underlying problem is caused because the custom auth class is not aware of the underlying client and the request is missing the
request.extensions={'timeout': {...}}
but this exposes the bigger problem has been raised in #3383 the custom auth class being too decoupled from the clientcode example reproducing the issue
workaround is to copy original extensions which was build by the client
httpx.Request(..., extensions=request.extensions)
full log
Beta Was this translation helpful? Give feedback.
All reactions