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)?
Since MediaWiki 1.29, the API can return errors in a new format (documentation): if the global
errorformatparameter is set to anything other thanbc(the default, for backwards compatibility), then instead of a singleerrorobject, the response can contain anerrorslist of error objects. Sincemwapicurrently only checks if the response contains anerror, if the user specifies a different error format thenmwapiwill not recognize the error(s) and instead return the result as a regular response.I’m not sure what
mwapishould do in this case, though. Throw anAPIErrorfor the first error and ignore the rest? Define a new exception class for a list ofAPIErrors (which should probably derive fromAPIErrorso it can still be caught like one)?