I maintain a library that provides XML/A access trhough javascript: https://github.com/rpbouman/xmla4js
Mostly it works ok, but I would like to improve handling of error responses. As far as I understand the XML/A spec corectly, error responses take this form:
<SOAP-ENV:Envelope>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>...</faultcode>
<faultstring>...</faultstring>
<faultactor>...</faultactor>
<detail>
...
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
However, I found that at least for Mondrian (the XML/A provider I am most familiar with) the <detail>
element often contains invaluable information. For instance, the general <faultcode>
element may say something generic like "datasource not found" whereas the <detail>
element may contain something like:
<XA:error xmlns:XA="http://mondrian.sourceforge.net">
<code>00HSBC01</code>
<desc>The Mondrian XML: MondrianOneToOneUserRoleListMapper.ERROR_001_ - Access is denied because the roles of this user don't correspond to any present in the Mondrian schema requested.</desc>
</XA:error>
Which indicates a rather more specific condition.
My question is, is there some kind of pattern in the error response of other XML/A providers that I can use to impove my api and provide better error messages to the users of my library? If you don't know about a patter but can only provide samples of XML/A providers you happen to have access to than that is also greatly appreciated. Thank you!