Skip to Content

Server Error Handling in SAPUI5 based application

Hi All,

I need to display server errors like 500, 404 in Message Pop up on screen. I have created an application based on SAPUI5 template in SAP Web IDE. So the structure does not have ErrorHandler.js

This can be achieved through ErrorHandler.js in apps based on Fiori template.

Hence, I tried creating ErrorHandler and defining the same in Component.js but no error pop up is displayed. I can see the error only on console.

I tried attachMetaDataFailed as well in Component but doesn't work.

dataSource is defined as below in manifest.json

Service metadata error appears in Network tab and console even before Component-preload.js loads. How do I display this error in a pop - up. Please help

Thanks & Regards,

Archana

manifest.png (27.7 kB)
compnent.png (36.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 21, 2018 at 02:59 AM

    Did you create an OData model in the manifest.json file that uses the OData service specified?

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 21, 2018 at 11:28 AM

    Yes, I have defined as per the structure, but havent given any name to the model. Structure wise it is all good. I am basically trying to handle metadata error and display the error in pop up message window

    Add comment
    10|10000 characters needed characters exceeded