Unable to handle uncaught errors in production mode #10534
Replies: 3 comments
-
Any news? |
Beta Was this translation helpful? Give feedback.
-
@brophdawg11, @timdorr, hi! May be I should file an issue? |
Beta Was this translation helpful? Give feedback.
-
I don't think this is an issue with React Router, but instead due to something going on in You may want to keep an eye on this proposal as well which is looking for a way to let errors bubble outside the router: #10166 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Team!
I use a global error handler to catch exceptions.
I found that these exceptions are caught only in development mode but not in production when I use react-router.
Here is an example - https://github.com/aerialist7/unhandled-in-prod-react-router
npm install
npm run start
for development mode ornpm run build
+npm run serve
for production mode)Why it works this way?
Is it a bug?
P.S. When I removed react-router usage - exceptions are caught both in development and production modes
Beta Was this translation helpful? Give feedback.
All reactions