jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1029487?usp=email )
Change subject: [fix] retry api request on ServerError ......................................................................
[fix] retry api request on ServerError
Again retry api request on ServerError but without FatalServerError. ServerError is raised when a requests.ReadTimeout or requests.ConnectTimeout occurs.
This partially reverts commit 1df22074e5b7484295cedbcd897beb70bf50521a.
Bug: T364275 Bug: T364393 Change-Id: I988cf7c824fd634e1c15092ef9471d58b5434074 --- M pywikibot/data/api/_requests.py 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified Matěj Suchánek: Looks good to me, approved
diff --git a/pywikibot/data/api/_requests.py b/pywikibot/data/api/_requests.py index 2cc5cb7..b6afb6b 100644 --- a/pywikibot/data/api/_requests.py +++ b/pywikibot/data/api/_requests.py @@ -30,10 +30,10 @@ from pywikibot.exceptions import ( Client414Error, Error, + FatalServerError, MaxlagTimeoutError, NoUsernameError, Server504Error, - ServerError, SiteDefinitionError, ) from pywikibot.login import LoginStatus @@ -694,7 +694,7 @@ pywikibot.warning( 'Caught HTTP 414 error, although not using GET.') raise - except (ConnectionError, ServerError): + except (ConnectionError, FatalServerError): # This error is not going to be fixed by just waiting pywikibot.error(traceback.format_exc()) raise