Hi,
I am wondering how errors and warnings are reported through the API, and which errors and warnings are possible. There is some documentation on Wikidata errors [1], but I could not find documentation on how the warning messages are communicated in JSON. I have seen structures like this:
{ "warnings" : {"wbeditentity": {"messages": [{"name":"wikibase-self-conflict-patched", "parameters":[], "html": { "*":"Your edit was patched into the latest version, overriding some of your own intermediate changes."} }] } } }
I don't know how to provoke more warnings, or multiple warnings in one request, so I found it hard to guess how this pattern generalises. Some questions:
* What is the purpose of the map with the "*" key? Which other keys but "*" could this map have? * The key "wbeditentity" points to a list. Is this supposed to encode multiple warnings of this type? * I guess the "name" is a message name, and "parameters" are message "arguments" (as they are called in action="query") for the message? * Is this the JSON pattern used in all warnings or can there also be other responses from wbeditentity? * Is this the JSON pattern used for warnings in all Wikibase actions or can there also be other responses from other actions? * Is there a list of relevant warning codes anywhere? * Is there a list of relevant error codes anywhere? The docs in [1] point to paraminfo (e.g., http://www.wikidata.org/w/api.php?action=paraminfo&modules=wbeditentity) but there are no errors mentioned there.
Thanks,
Markus