UI5 / UI5/openui5

NestedComponent - error handling

Open
#3,877 2 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

enhancement in progress
Dominant language
JavaScript
Stars
3.3k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.