Documentation for <warnings> ?

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

Documentation for <warnings> ?

Nicolas Vervelle-3
Hi,

The <error> tag is documented at http://www.mediawiki.org/wiki/API:Errors
I am looking the same kind of documentation for the <warnings> tag. Is
there documentation about it ?

I have modified my tool to log messages in case of errors reported by
the API, and I would like to do the same for warnings, but I'd like to
be sure about the format.

For example, I received the following warning :
<api>
  <warnings>
    <ApiPageSet>
      Too many values supplied for parameter 'titles': the limit is 50
    </ApiPageSet>
  </warnings>
...

Is it always the same format : a code in a tag, and the description as
text ?

TIA,
Nico

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

Re: Documentation for <warnings> ?

Roan Kattouw
---- Nicolas Vervelle <[hidden email]> schrijft:
> Hi,
>
> The <error> tag is documented at http://www.mediawiki.org/wiki/API:Errors
> I am looking the same kind of documentation for the <warnings> tag. Is
> there documentation about it ?
No, but there should be.

> I have modified my tool to log messages in case of errors reported by
> the API, and I would like to do the same for warnings, but I'd like to
> be sure about the format.
>
> For example, I received the following warning :
> <api>
>   <warnings>
>     <ApiPageSet>
>       Too many values supplied for parameter 'titles': the limit is 50
>     </ApiPageSet>
>   </warnings>
> ...
>
> Is it always the same format : a code in a tag, and the description as
> text ?
Yes. The code in the tag is the name of the module that threw the warning (so your example is a bug: the tag should be <query>), and the warnings themselves are inside the tag, separated by newlines.

Roan Kattouw (Catrope)

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