Fix: undici retry on UND_ERR_DESTROYED

This commit is contained in:
SukkaW
2026-05-14 17:22:36 +08:00
parent 3f35971b93
commit f77f6bdcc3

View File

@@ -57,6 +57,7 @@ const agent = new Agent({
// Any code that is not a Undici's originated and allowed to retry // Any code that is not a Undici's originated and allowed to retry
if ( if (
errorCode === 'ERR_UNESCAPED_CHARACTERS' errorCode === 'ERR_UNESCAPED_CHARACTERS'
|| errorCode === 'UND_ERR_DESTROYED'
|| err.message === 'Request path contains unescaped characters' || err.message === 'Request path contains unescaped characters'
|| err.name === 'AbortError' || err.name === 'AbortError'
) { ) {