Error formats

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Error formats

Suhas Sumukh

What is the exact output when error formats is "raw". The "params" sometimes contains strings, arrays and even a hash map.

--
Suhas


_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: Error formats

Brad Jorsch (Anomie)
On Mon, Jun 3, 2019 at 1:35 PM Suhas Sumukh <[hidden email]> wrote:

What is the exact output when error formats is "raw". The "params" sometimes contains strings, arrays and even a hash map.

It's a representation of the MediaWiki i18n message data. Most parameters are strings or integers, but some are "magic" arrays or hashes indicating special formatting. And you can even have nested i18n messages as parameters.

Unfortunately the exact format isn't very well specified at the moment. What we probably need to do is enhance the MessageSpecifier interface with those kinds of "magic" arrays and such, and possibly even define a serialization format in MessageSpecifier.

--
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api