Pywikibot should log response headers when the response is an error from MediaWiki API ('error' in result).
Description
Description
Details
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
[IMPR] Add requests.Response.headers to log when an API error occurs | pywikibot/core | master | +1 -0 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Release | Xqt | T269066 Pywikibot release 6.0 dependencies | ||
Resolved | Feature | Xqt | T272325 Log response headers from MediaWiki API errors |
Event Timeline
Comment Actions
Where would be a good place to do this?
By the time we check if it is an error (pywikibot/data/api.py#L1821), we don't have access to the respose object.
I think pywikibot/comms/http.py#L255-L257 is the last point with access to the response object, but it hasn't been loaded to check if it is an error.
Comment Actions
Change 657042 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [IMPR] Add requests.Response.headers to log during APIError
Comment Actions
Change 657042 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] Add requests.Response.headers to log when an API error occurs