rusackas opened a new pull request, #41491:
URL: https://github.com/apache/superset/pull/41491
Follow-up to #40729.
That PR deferred plugin init and menu render until the language pack is
ready, but left two rough edges in the error handling that this tightens up.
### SUMMARY
- **`embedded/index.tsx`**: `start()` chains off the `pluginsReady` promise,
but that chain had no rejection handler. If `setupPlugins()` or
`setupCodeOverrides()` throws, `pluginsReady` rejects, the chain rejects
unhandled, and the `started` guard stays `true` forever, so a retry just
returns early and the embedded dashboard is stuck in a failed state. This adds
a rejection handler to the `pluginsReady.then(...)` in `start()` that logs the
error and resets `started = false` so a rehandshake can retry, mirroring the
existing guest-token failure path.
- **`menu.tsx`**: replaces the empty `.catch(() => {})` with the same
`try/finally` + `logging.error` pattern already used in `views/index.tsx`, so
the menu still always renders (import/render in `finally`) but unexpected
failures get logged instead of swallowed.
No behavior change on the happy path; this only hardens the failure paths.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A (error-path hardening, no visual change).
### TESTING INSTRUCTIONS
1. Embedded: force a throw inside `setupPlugins()`/`setupCodeOverrides()`
and confirm the error is logged and `started` resets so a retry can proceed,
rather than the dashboard hanging.
2. Menu: force `initPreamble()` to reject and confirm the menu still renders
(in English) and any unexpected render error is logged.
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]