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
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/657042
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I8be4475bf10504311c236e1a42e1d6775aacab3a
Gerrit-Change-Number: 657042
Gerrit-PatchSet: 5
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: JJMC89 <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-CC: Mpaa <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits