-
Notifications
You must be signed in to change notification settings - Fork 48
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: add timeout error #982
Conversation
jlahovnik
commented
Jan 11, 2024
•
edited by sbrunato
Loading
edited by sbrunato
- handle timeout error in server mode
- fixes search errors raised for a given provider
Code Coverage (Ubuntu)
Minimum allowed coverage is Generated by 🐒 cobertura-action against dadfa42 |
Code Coverage (Windows)
Minimum allowed coverage is Generated by 🐒 cobertura-action against dadfa42 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please implement TimeoutError
in every piece of code where a timeout can occur (look for timeout=
in methods args)
321f1f2
to
9dbaabf
Compare
done |
@@ -154,6 +154,8 @@ def authenticate(self) -> Union[AuthBase, Dict[str, str]]: | |||
exchange_url = user_consent_response.url | |||
try: | |||
token = self.exchange_code_for_token(exchange_url, state) | |||
except requests.exceptions.Timeout as exc: | |||
raise TimeOutError(str(exc)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please handle all timeout exceptions the way it is done in qssearch
:
raise TimeOutError(exc, timeout=timeout) from exc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Co-authored-by: Sylvain Brunato <61419125+sbrunato@users.noreply.github.com>
8f05815
to
dadfa42
Compare