Skip to Content

Catch error for Model.loadData

I call a MII Transaction to get information about the actual logged in user. It is all fine when someone is logged in, but when nobody is logged in, I always get a realy long error message in the console because of a parsing error.

How can I catch the error and get rid of the error message?

oModel.loadData(url, null));

unbenannt.png (20.9 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Apr 13 at 01:01 PM

    Have you looked at attachParseError to see if that would help?

    https://sapui5.hana.ondemand.com/#/api/sap.ui.model.Model/methods/attachParseError

    Add comment
    10|10000 characters needed characters exceeded

    • I added this to my source code before calling oModel.loadData

      oModel.attachParseError(function(oEvent) {<br> console.log("Parserror");<br> });

      Can't see the log entry in the console, but still the error message.