jenkins-bot submitted this change.
[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(-)
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
To view, visit change 657042. To unsubscribe, or for help writing mail filters, visit settings.