add stream unable to pipe err code (#31160)

GitOrigin-RevId: 2b8c8e19696d5b07ef2ae33c97405ea5cd3cf803
This commit is contained in:
Anna Claire Fields
2026-02-02 09:04:46 +00:00
committed by Copybot
parent 3000a9108d
commit 3649832fc8
@@ -588,10 +588,12 @@ async function getChanges(req, res, next) {
} }
function isPrematureClose(err) { function isPrematureClose(err) {
return ( return (
err instanceof Error && err instanceof Error &&
'code' in err && 'code' in err &&
err.code === 'ERR_STREAM_PREMATURE_CLOSE' (err.code === 'ERR_STREAM_PREMATURE_CLOSE' ||
err.code === 'ERR_STREAM_UNABLE_TO_PIPE')
) )
} }