5.61.1
Patch Changes
- #5472
de8435fThanks @ablaszkiewicz! - fix: exception autocapture now captures unhandled promise rejections when the app or framework (for example Next.js, Nitro or PM2) has its ownunhandledRejectionlistener, without changing what Node does with the rejection. Each occurrence is captured once per project, however many clients the app creates, and an error reported more than once in the same turn of the event loop (rethrown by a host listener, or one Error object rejected by two promises) is captured once. When the process survives the error, autocapture captures it at the end of the current turn of the event loop, so that acaptureExceptioncall for the same error in that turn, from the app's own listener or a framework's error hook such as Nitro's, is the one sent, with itsdistinctIdand properties. AcaptureExceptioncall for an error that autocapture already captured in the same turn is skipped. When the app flushes or shuts down a client, that client captures at once what is still waiting for the end of the turn, so a crash handler that flushes or shuts down and then exits still sends the error. A crash is captured whatever the error, anAbortErroror a framework's control flow included. A rejection that the app handles only later is still captured, as Node reports it as unhandled. Next.js and React control-flow errors andAbortErrorrejections are skipped when the process survives them.
(2026-10-30)