how to handle subapp errors and switching to non-erroring subapp #1643
Unanswered
vivekVells
asked this question in
Q&A
Replies: 1 comment
-
|
was thinking about the following approach. someone correct me if this is not the best one. thanks. Approach:
Example:Description:
Dev Setup:
addGlobalUncaughtErrorHandler((event) => {
console.log({'error occurred.... ': event?.error});
if(event?.error) {
// this would resolve locally as "http://localhost:7099/subapp-error-page.html"
const redirectUrl = `${window.location.origin}/subapp-error-page.html`;
// we can make this redirectUrl to point to the ErrorPage
window.location.href = redirectUrl;
}
});Steps & Output:
@kuitos any thoughts? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Newbee here! Trying to build and handle microapps using quiankun.
Issue:
Question:
is there any error boundary related solution that can be leveraged by passing something like a errorBoundary prop to the subapps during registering the micro apps like below
I used the error boundary concept from react to stop any subapp error that would bring down the entire site; but, still unable to switch figure out how to switch different sub app. I can use
addGlobalUncaughtErrorHandlerto catch the errorExample Scenario:
Note:
Action:
Beta Was this translation helpful? Give feedback.
All reactions