Parcourir la source

add stream unable to pipe err code (#31160)

GitOrigin-RevId: 2b8c8e19696d5b07ef2ae33c97405ea5cd3cf803
Anna Claire Fields il y a 6 mois
Parent
commit
3649832fc8
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      services/web/app/src/Features/History/HistoryController.mjs

+ 3 - 1
services/web/app/src/Features/History/HistoryController.mjs

@@ -588,10 +588,12 @@ async function getChanges(req, res, next) {
 }
 
 function isPrematureClose(err) {
+
   return (
     err instanceof Error &&
     'code' in err &&
-    err.code === 'ERR_STREAM_PREMATURE_CLOSE'
+    (err.code === 'ERR_STREAM_PREMATURE_CLOSE' || 
+      err.code === 'ERR_STREAM_UNABLE_TO_PIPE') 
   )
 }