addErrorHandler won't catch application died in status LOADING_SOURCE_CODE when using single-spa layout engine. #921
Replies: 2 comments
-
I have the same issue.
If an application fails to load - the There are 2 questions:
Thanks in advance! |
Beta Was this translation helpful? Give feedback.
-
Added a comment here
|
Beta Was this translation helpful? Give feedback.
-
Hello there, I got a bug that I don't know how to handle it. I tried to add addErrorHandler in the root config of my single spa. And currently, I am also using the single-spa-layout which requires me to constructLayoutEngine. Logically the error should have been caught. But weirdly after catching the error, I got the same error and I couldn't catch it and it is being displayed on the browser console. But when I remove the constructLayoutEngine the error is not being displayed at all and it was successfully caught by my errorHandler. I am trying to handle the application "LOAD_ERROR" and return an error UI.
To reproduce this error you can download my code and npm install both root-config and mfe-home. And only run the root config by doing npm start on the root config. And when you access http://localhost:9000/ and open the console by inspecting the page there will be an error being displayed.
I am trying to remove this error by catching it. I was able to successfully do it the first time but for the second time, it failed.
Here are some screenshot of my code and the error that I am getting:
I would much appreciate any help, thank you.
Beta Was this translation helpful? Give feedback.
All reactions