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
e.g. if you forget to await a promise, an unhandled promise rejection is thrown causing process termination and requiring manual restart of the dev server. I think I can fix this by catching them in my own code, but it might be good for miniflare to catch them in general as it would better mirror the behavior of a cloudflare worker (which wouldn't die to an unhandled promise rejection-- at least I don't think they do?).
The text was updated successfully, but these errors were encountered:
evrys
changed the title
Unhandled promise rejections cause miniflare process termination (Windows, node 16)
Unhandled promise rejections cause miniflare process termination (Windows, node v16.2.0)
Dec 9, 2021
...instead, log them. Adds a new `logUnhandledRejections` option.
If a user has an `unhandledrejection` event listener in their
worker, the rejection will only be logged if the user doesn't call
`preventDefault()` on the event.
Hey! 👋 Miniflare 2.0.0-rc.4 has just been released, which no longer crashes on unhandled rejections, logging them instead. You can find the full changelog here and install it with npm i miniflare@next -D. Please let me know if you have any other issues, and feel free to ask questions in the #miniflare channel of the Cloudflare Workers Discord server.
...instead, log them. Adds a new `logUnhandledRejections` option.
If a user has an `unhandledrejection` event listener in their
worker, the rejection will only be logged if the user doesn't call
`preventDefault()` on the event.
e.g. if you forget to
await
a promise, an unhandled promise rejection is thrown causing process termination and requiring manual restart of the dev server. I think I can fix this by catching them in my own code, but it might be good for miniflare to catch them in general as it would better mirror the behavior of a cloudflare worker (which wouldn't die to an unhandled promise rejection-- at least I don't think they do?).The text was updated successfully, but these errors were encountered: