Page MenuHomePhabricator
Authored By
matmarex
Aug 28 2019, 1:43 PM
Size
1 KB
Referenced Files
None
Subscribers
None
BREAKING CHANGE: Action API action=edit error messages from AbuseFilter and SpamBlacklist
When saving an edit is prevented by the AbuseFilter or SpamBlacklist extensions, the format of the API error response will be different.
The extensions previously used a different format for their API error responses than the usual used by core MediaWiki and other extensions, indicating the failure with `.edit.result == 'Failure'`. They will now return a response with a top-level `.error` or `.errors` object, depending on 'errorformat', same as for any other error condition in the API.
The motivation for this change is to allow error handling in API consumers to be simplified, especially those using 'errorformat=html'. If your tool had custom error handling for this case, it can be removed and replaced by the general error handling code you probably already have. Note that the ConfirmEdit (CAPTCHA) extension still uses the old format.
Sample API error responses:
* AbuseFilter
* Before: https://phabricator.wikimedia.org/P8988
* After: https://phabricator.wikimedia.org/P8989
* SpamBlacklist
* Before: https://phabricator.wikimedia.org/P8990
* After: https://phabricator.wikimedia.org/P8991
* Generic error message for comparison:
* https://phabricator.wikimedia.org/P8992
See https://phabricator.wikimedia.org/T229539 for relevant patches and discussion.

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
7893684
Default Alt Text
raw.txt (1 KB)

Event Timeline