-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Since MediaWiki 1.29, the API can return errors in a new format (documentation): if the global errorformat parameter is set to anything other than bc (the default, for backwards compatibility), then instead of a single error object, the response can contain an errors list of error objects. Since mwapi currently only checks if the response contains an error, if the user specifies a different error format then mwapi will not recognize the error(s) and instead return the result as a regular response.
I’m not sure what mwapi should do in this case, though. Throw an APIError for the first error and ignore the rest? Define a new exception class for a list of APIErrors (which should probably derive from APIError so it can still be caught like one)?