XZise added a comment. Okay looking more closely at `error_handling_callback` it won't fail when the status code is not 200 or 207 but just emit a warning. That means our wikidataquery module is getting the response which is actually an error message but tries to parse it as JSON. Now we could check what the server is returning. If there is a warning which should look like “Http response status 502” then it returns the valid code and we need to add a logic which doesn't decode it when the status code is not 200. Otherwise `error_handling_callback` is not called or the server is not returning the correct status code.
The original error is also different in that it specifically raises an exception when the code is 504 while the second error is a 502 which has no such exception in `error_handling_callback`. TASK DETAIL https://phabricator.wikimedia.org/T89769 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: XZise Cc: XZise, jayvdb, Aklapper, pywikibot-bugs _______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
