[Mediawiki-api-announce] BREAKING CHANGE: Error code and other message reporting changes
With the merge of Gerrit change 321406, come some breaking changes to the formatting of errors and warnings from some modules. These changes should be on Beta Labs shortly, and should be deployed to WMF wikis with 1.29.0-wmf.6.
Error codes returned by some modules have changed. Notably, codes from query submodules will no longer include the module prefix, e.g. if you supply a bad continuation parameter for prop=revisions it will report error code 'badcontinue' instead of 'rvbadcontinue'. Other codes may have changed as well, e.g. for list=allpages the error for attempting to use redirects=1 in generator mode is now 'invalidparammix' instead of 'params'.
If you're attempting to parse the human-readable 'info' text of errors, that text may have changed. Use cases should be submitted in Phabricator as feature requests to include the needed data in a machine-readable format alongside the error message.
action=emailuser may return a "Warnings" status, and now returns 'warnings' and 'errors' subelements (as applicable) instead of 'message'.
action=imagerotate returns an 'errors' subelement rather than 'errormessage'.
action=move now reports errors when moving the talk page as an array under key 'talkmove-errors', rather than using 'talkmove-error-code' and 'talkmove-error-info'. The format for subpage move errors has also changed.
action=rollback no longer returns a "messageHtml" property on errors. Use errorformat=html if you're wanting HTML formatting of messages.
action=upload now reports optional stash failures as an array under key 'stasherrors' rather than a 'stashfailed' text string.
action=watch reports 'errors' and 'warnings' instead of a single 'error'
This same change brings the ability to request errors and warnings in languages other than English and formats other than plain text. See the new 'errorformat', 'errorlang', and 'errorsuselocal' parameters to the 'main' module.