Failed to catch AbortError from undici.request
after server returns
#3736
Labels
bug
Something isn't working
undici.request
after server returns
#3736
Bug Description
The following minimum reproduction log
ignore error
andhey
and then the entire process crashes withprocess.processTicksAndRejections
. It seems that the abort error is leaked instead of being catched.Reproducible By
Expected Behavior
The above minimum reproduction should log
ignore error
andhey
and the process to exit with 0.Logs & Screenshots
Environment
Node.js 22.6.0 w/ undici 6.20.1
The error can be reproduced on both Linux and macOS.
Additional context
I am using
Promise.any
andundici.request
to perform requests to multiple mirror URLs to get the fastest response and abort the rest. I also have a local cache and will bail out of allundici.request
early if the fastest response matches certain criteria. I want to usetry { } catch { }
to catch the error and perform some logic.The text was updated successfully, but these errors were encountered: