feat: Display unhandled exceptions from the Controller extension inside the Info Center.#4627
Conversation
…n inside the Info Center. Register handlers on the globalThis object for error or promise rejection events. Any error containing in its stack trace the pattern /changes/coding/path/to/ts/or/js file will be displayed. This is a reliable check because all controllers reside in the changes/coding folder inside the adp project.
🦋 Changeset detectedLatest commit: c1f926e The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
SummaryThe following content is AI-generated and provides a summary of the pull request: Display Unhandled Controller Extension Errors in the Info CenterNew Feature✨ Adds global error detection for unhandled exceptions and promise rejections originating from Controller Extensions in the Adaptation Project editor. Matching errors are surfaced as error-level messages in the Info Center panel, helping developers quickly identify runtime issues in their controller code. Errors are identified by checking if the stack trace contains the pattern Changes
Images and LinksGitHub Issue #4626: Display unhandled exceptions from the Controller extension inside the Info Center
PR Bot InformationVersion:
|
There was a problem hiding this comment.
The PR introduces a useful feature but has a few correctness issues to address: the global event listeners are never deregistered (creating a leak and potential duplicate-firing across test runs), non-Error promise rejection reasons are silently dropped even when they originate from a controller extension path, and the test suite's afterEach does not clean up the registered listeners, making repeated test executions unreliable.
lfindlaysap
left a comment
There was a problem hiding this comment.
@avasilev-sap, also in your screenshot "Target was not found" should not end with a period and "controller initialization error" is very generic and not phrased as a sentence. Could you show me where I can suggest changes to them as well?
The "Target was not found" text is from the application itself. It is not localized or set from our codebase. The text is set as a binding, bindingString: "{_templPrivGlobal>/generic/messagePage/text}"
oValue: "Target was not found."You can contact sb from the UI5/RTA team if you want to change the translation. The second text "controller initialization error" is a dummy text which i used to throw as an exception from a dummy controller just to test the feature. In the Testing done section of this PR there is a small Controller which throws the latter exception. This text is not part of the project, please ignore it. |
Jimmy-Joseph19
left a comment
There was a problem hiding this comment.
Changes looks good.
Covered with unit test
Changeset found
Ran the branch against integration test result - Paased
https://github.com/SAP/open-ux-tools/actions/runs/25503795851
Did not test locally
IvoSG
left a comment
There was a problem hiding this comment.
Changes looks good.
Good test coverage
Changeset is ok
Did not test locally
|
…t_take2 * origin/main: Project modules update 12.05.2026 (5242) (#4661) update skill name (#4658) chore: apply latest changesets feat: Display unhandled exceptions from the Controller extension inside the Info Center. (#4627) chore: apply latest changesets feat: update splitter for new ui (#4648) chore: apply latest changesets tbi(generator-odata-downloader): Make self contained (#4656) chore: apply latest changesets fix: change confirm replace additional message based on environment (#4628) chore: apply latest changesets fix(sap-systems-ext): add new create new command (#4645) chore: apply latest changesets (fiori-mcp-server) add additional guidance on the adding of extension in fiori (#4643) test: update skill (#4651) chore: apply latest changesets fix: Add fragment list to model for custom fragments (#4601) chore: apply latest changesets Docs(eslint-plugin-fiori-tools): add cds code snippets to rule documentation (#4623)









#4626
Register handlers on the globalThis object for error or promise rejection events. Any error containing in its stack trace the pattern /changes/coding/path/to/ts/or/js file will be displayed. This is a reliable check because all controllers reside in the changes/coding folder inside the adp project.
Testing done: