You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to display fallback via ErrorBoundary with following steps:
Purposely not running remote app in preview mode.
Only run host app in dev mode.
Attempt to catch the error 404 with remoteEntry.js via vite.config.ts (But nothing is logged there in the console)
ErrorBoundaryWrap component never gets to display the fallback
In short, with my understanding if I have two app. Calling them Host & Remote app.
If remote goes down, leaving only host available.
Host should be able to capture the error via ErrorBoundary instead of displaying white / blank screen.
import{FC}from'react';import{ErrorBoundary}from'react-error-boundary';typeErrorBoundaryWrapProp={children: JSX.Element;};exportconstErrorBoundaryWrap: FC<ErrorBoundaryWrapProp>=({ children })=>{return(<ErrorBoundaryfallbackRender={()=><div>Something went wrong while fetching remoteEntry</div>}>{children}</ErrorBoundary>);};
vite.config.ts - portion of the MFE plugin (Host app):
Note: the catch and finally block never gets logged in console
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi everyone!
I have been trying to display fallback via ErrorBoundary with following steps:
In short, with my understanding if I have two app. Calling them Host & Remote app.
If remote goes down, leaving only host available.
Host should be able to capture the error via ErrorBoundary instead of displaying white / blank screen.
Anyone have any idea to go around this?
App.tsx (Host app):
ErrorBoundaryWrap.tsx (Host app):
vite.config.ts - portion of the MFE plugin (Host app):
Note: the catch and finally block never gets logged in console
Error message:
Note: Once this error message appears, ErrorBoundary never get to display on UI
Beta Was this translation helpful? Give feedback.
All reactions