jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/657042 )
Change subject: [IMPR] Add requests.Response.headers to log when an API error occurs ......................................................................
[IMPR] Add requests.Response.headers to log when an API error occurs
Bug: T272325 Change-Id: I8be4475bf10504311c236e1a42e1d6775aacab3a --- M pywikibot/data/api.py 1 file changed, 1 insertion(+), 0 deletions(-)
Approvals: JJMC89: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 2106b0a..99c1225 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -1853,6 +1853,7 @@ 'help': result['error']['help']}}
pywikibot.warning('API error %s: %s' % (code, info)) + pywikibot.log(' headers=\n{}'.format(response.headers))
if self._internal_api_error(code, error, result): continue