-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: support throw render error when ssr in production #9364
Comments
similar to #7876 |
I'm not even using SSR, but I just ran into this same issue when trying to add in a global |
Just to chime in: I was bitten by this as well, trying to handle |
I have the same issue about unhandledrejection. It has different behavior between dev and prod. Error from vue will not be t trigger unhandledrejection in prod. Any solution? |
closed via f476b7f |
Vue version
3.3.4
Link to minimal reproduction
https://play.vuejs.org/#eNp9U8tu3DAM/BVWF2sBx0aRW7Ab9IEAbYE+0ATtRRfD5tpKbcml5N0tDP97KQn7SBvkZnGG5HBIz+LtOBa7CcWNWLua9OjBoZ/GW2X0MFryMAPhFhbYkh0gY2qmjDK1Nc7D4FrYBFxmH7DvLfy01DevspUy6zKV40L88DiMfeWRXwDr7vXtPMfkZVmX/IpRbcbJw+5qsA32GyUYV4KhdXnKFrnwjltvdVs8OmtY9RxylajtMOoe6evoNUtT4gYiErCKle0/xZinCfNjvO6w/vVM/NEdQkyJb4QOaYdKnDBfUYs+wXf3X/DA3yeQlU89s18Av6Oz/RQ0Jtq7yTQs+4IX1X6M3mvTPri7g0fjjkMFoYG5RL4SvI/3L4x+lntdXMc8ZRZ2UTs3IVvIBqZNztDl0OBWm1jPGjQ+h5qQbecT4f2HPf+eNKGMR8ArPl5BuBDTID3Ye0+s+Sn5DbPLaCNdJR7SZfbnP6eGnPaPBBknSTIauToOFjJtj0VvW9nYehqYyiWPtqQ2ZzrxRZOBTmaN3mU5pGPN4ceE8VaTLReaKp54c55eXmiMrKfzSqavCt+hkbLzQ7+CzW1qfakzIqFNUVe+7qREIkv/c2NYZs4RxE/Wm5iBVJbQWHB2QN8Fp/fadxzZm5aqBsFbqDkv/EFpILH8BWncUH8=
Steps to reproduce
I want to catch some errors during vue server-side rendering in node.js instead of defining error handlers inside vue such as app.config.errorHandler. When I use the following code to catch an error, in the development environment vue will throw the error, but in the production environment vue swallows the error, which makes it impossible to catch the error with a catch
How to test
The reason for the error is that vue handles error objects differently in development and production environments.
In production environments vue will not throw error
What is expected?
We can use try catch some error during vue rendering process
What is actually happening?
try catch cannot catch some error during vue rendering process
System Info
No response
Any additional comments?
For the reasons mentioned above,Perhaps a configuration could be added here to decide whether or not to throw an error in the production environment
The text was updated successfully, but these errors were encountered: