openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

NestedComponent - error handling

Open TheNorthBridge opened this issue 2 years ago • 2 comments

OpenUI5 version: 1.108 Browser/version (+device/version): Chrome

URL (minimal example if possible): https://sdk.openui5.org/entity/sap.ui.core.routing.Router/sample/sap.ui.core.sample.RoutingNestedComponent/code https://sdk.openui5.org/topic/fb19f501b16e4e4991eb6a017770945b

What is the expected result and what happens instead? We have an app with more than 15 NestedComponents. The setup of the app with its NestedComponents is identical to the recommendations in the links above. Loading and navigation between the components work fine.

Now, we are encountering an issue when the user's session expires, and the user attempts to navigate to a NestedComponent that was not loaded in his/her active session before. In the browser console, I see an error from 'sap.ui.core' with a 'ModuleError' exception: 'ModuleError: failed to load '.. URL of the NestedComponent ...' from '.. URL of the current component ..'.

I would like to catch this exception or attach some kind of event handler to UIComponent, Router, or whatever is necessary so that we can inform the user that something went wrong.

Currently, nothing happens when the user tries to navigate to the NestedComponent, because UI5 just throws the exception.

Any other information? (attach screenshot if possible) image

Unfortunately, I couldn't find any information about error handling for NestedComponents on sdk.openui5, and I'm seeking help on this topic because it's not clear whether this is a missing functionality of UI5.

Regards TheNorthBridge

TheNorthBridge avatar Oct 27 '23 10:10 TheNorthBridge

Hello @TheNorthBridge Thank you for sharing your enhancement proposal. I've created an internal incident 2370131436. The status of the issue will be updated here in GitHub.

50gY avatar Oct 27 '23 11:10 50gY

Short update, as we follow-up considering such an enhancement via our agile development process, in dedicated task CPOUI5FRAMEWORK-605.

ecker avatar Feb 20 '24 13:02 ecker