https://bugzilla.wikimedia.org/show_bug.cgi?id=66619
--- Comment #19 from Thiemo Mättig thiemo.maettig@wikimedia.de --- Ok, I had a chance to talk to the rest of the Wikidata team. The fact that "messages" was not an array was a bug. It should be an array (with numeric keys, obviously).
The problem is that there are many different places where error messages are build. We started unifying them by introducing Wikibase ApiErrorReporter but this may not have cleaned up all instances. If you find situations where "messages" still is an object (with string keys) please report them.