-
Notifications
You must be signed in to change notification settings - Fork 79
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
importing edge-runtime
breaks process exit behavior
#146
Comments
Hey @EndangeredMassa! Thank you for this. @javivelasco and I did a bit of analysis. The reason why we caught exceptions & rejections at process level within EdgeRuntime is to avoid exiting the runtime itself. This way, the runtime is resilient to exception/rejections occurring within the executed user code. But this creates that undesirable side you demonstrated: the simple import of the EdgeRuntime swallows everything! Very bad. Our plan is the following:
How does it sounds to you? |
That sounds good to me, thanks! |
… importing the EdgeRuntime module (#222)
…n when importing the EdgeRuntime module (vercel#222)
If I import the edge runtime, then my process has an uncaught exception, my process exits with no error message and an exit code of
0
.Reproduction: https://github.com/EndangeredMassa/reproduction-process-exit-behavior
Example:
It seems that these lines are the cause:
edge-runtime/packages/runtime/src/edge-runtime.ts
Lines 64 to 76 in ccdb203
The text was updated successfully, but these errors were encountered: