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,


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

Assigned Tags

Related questions

2 Answers

  • Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • Posted on 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.