Hi Markus,

for reference, our error message parsing happens in WikibaseJavaScriptApi:
https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FWikibaseJavaScriptApi/24eb30d9cbf7fc2e3b83afd9cc651e72f7f6157f/src%2FRepoApiError.js#L85
This is only used for parsing errors returned by Wikibase API modules, though.

On Tue, Sep 1, 2015 at 5:17 PM, Markus Krötzsch
<[email protected]> wrote:
> On 01.09.2015 16:57, Thiemo Mättig wrote:
>>
>> Hi,
>>
>>  > I now identified another format for API warnings [...] from action
>> "watch"
>>
>> I'm not absolutely sure, but I think this is not really an other format.
>> The "warnings" field contains a list of modules. For each module you can
>> either have a list of "messages", or a plain string. In the later case
>> the string is stored with the "*" key you see in both examples.
>>
>> The relevant code that creates these "warnings" structures for Wikibase
>> can be found in the ApiErrorReporter class.
>>
>> The { "name": ..., "parameters": ..., "html": { "*": ... } } thing you
>> see is a rendering of a Message object. The "html" key can be seen in
>> \ApiErrorFormatter::addWarningOrError, the "*" is a result from the
>> Message class.
>>
>> Hope that helps.
>
>
> Yes, this is very helpful. Thanks. I had looked at this PHP code, but I
> could not see these things there (strings like "*" are not very distinctive,
> so I was not sure which "*" I am looking at ;-).
>
> Markus
>
>
>
> _______________________________________________
> Wikidata-tech mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/wikidata-tech



-- 
Adrian Heine né Lang
SOFTWARE DEVELOPER

Wikimedia Deutschland e.V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Phone: +49 (0)30 219 158 26-0
http://wikimedia.de

Imagine a world, in which every single human being can freely share in
the sum of all
knowledge. That‘s our commitment.

Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e. V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter der
Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für
Körperschaften I Berlin, Steuernummer 27/681/51985.

_______________________________________________
Wikidata-tech mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech

Reply via email to