cancel
Showing results for 
Search instead for 
Did you mean: 

Server Error Handling in SAPUI5 based application

0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

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

former_member322772
Active Participant
0 Kudos

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

0 Kudos

No, I have just defined the datasource in manifest. Didnt create an OData model there. Sorry for my knowledge here, but do we create OData model in manifest and if yes where do we do that?

nabheetscn
Active Contributor
0 Kudos

I would recommend you to check it at SAPUI5 help here to understand the basic structure.

Nabheet