How to get more specific error details from getErrorDetail() ?

Hi community,

we can use getErrorString() and getErrorDetail() to catch error information from failed queries.

getErrorString() only contains a short description, while getErrorDetail returns the short-description + some long text + some XML content.

Does anyone know a way to only get the xml part of getErrorDetails() that contain the item information? 

I most of the time use getErrorString, but I have a use case for mass operations, where the xml part contains the relevant information if something went wrong. 

I want to provide more precise feedback to the end users (what has failed exactly), but also use the xml information to call some "automatically repair if this error happens" function. But for this function I would need the item information in the xml part.

Does anyone has and idea to get more specific error details?

Thanks and best regards!


  • Certainly! To extract specific information from the XML part of getErrorDetails(), you can use XML parsing techniques. Utilize an XML parser to extract the relevant item information from the detailed error response. Once you have parsed the XML, you can access the specific elements or attributes containing the item details.

    For instance, in many programming languages, you can use libraries like DOMParser or XMLPullParser to parse XML. Extract the necessary information, such as item details, from the parsed XML structure. This way, you can provide more precise feedback to end-users and implement automatic error resolution based on the extracted item information from the XML part of getErrorDetails().

  • I'm happy to help! Get specified information from getErrorDetails()'s XML component using XML parsing. Use an XML parser to get item data from the lengthy error response. Parsing the XML allows access to item details components or attributes. 

    run 3

  • None of the two AI spam bot answers is useful.

    I am happy that spammers at least try to cover their spam with "something useful", but please try to optimize your spam that it works better in the context of Innovator.