[PR #1003] [MERGED] fix: re-throw stream errors in pumpReader to prevent incomplete ISR cache data #1014

Closed
opened 2026-05-06 13:11:34 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/1003
Author: @Divkix
Created: 5/1/2026
Status: Merged
Merged: 5/1/2026
Merged by: @james-elicx

Base: mainHead: fix/1002-pumpreader-swallows-errors


📝 Commits (2)

  • cdf6f94 fix: pumpReader now re-throws errors to prevent incomplete ISR cache data (#1002)
  • c70afc2 test: add regression test for pumpReader error propagation (#1002)

📊 Changes

2 files changed (+12 additions, -0 deletions)

View changed files

📝 packages/vinext/src/server/app-ssr-stream.ts (+1 -0)
📝 tests/app-ssr-stream.test.ts (+11 -0)

📄 Description

Fixes #1002

Summary

  • pumpReader() was silently swallowing stream read errors
  • This caused getRawBuffer() to return incomplete/corrupted data to the ISR cache
  • Added "throw error;" after the dev warning so pumpPromise properly rejects
  • Existing error handling in scheduleAppPageRscCacheWrite (line 376) already handles the error path

Test plan

  • Existing tests pass (app-router.test.ts, isr-cache.test.ts)
  • Build successful
  • The fix is minimal and follows the pattern described in the issue

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/1003 **Author:** [@Divkix](https://github.com/Divkix) **Created:** 5/1/2026 **Status:** ✅ Merged **Merged:** 5/1/2026 **Merged by:** [@james-elicx](https://github.com/james-elicx) **Base:** `main` ← **Head:** `fix/1002-pumpreader-swallows-errors` --- ### 📝 Commits (2) - [`cdf6f94`](https://github.com/cloudflare/vinext/commit/cdf6f9466c1483e1c8080027dfc70c4a93eedb10) fix: pumpReader now re-throws errors to prevent incomplete ISR cache data (#1002) - [`c70afc2`](https://github.com/cloudflare/vinext/commit/c70afc28d07f27a439385b5cdf43f70540f931ab) test: add regression test for pumpReader error propagation (#1002) ### 📊 Changes **2 files changed** (+12 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/vinext/src/server/app-ssr-stream.ts` (+1 -0) 📝 `tests/app-ssr-stream.test.ts` (+11 -0) </details> ### 📄 Description Fixes #1002 ## Summary - pumpReader() was silently swallowing stream read errors - This caused getRawBuffer() to return incomplete/corrupted data to the ISR cache - Added \"throw error;\" after the dev warning so pumpPromise properly rejects - Existing error handling in scheduleAppPageRscCacheWrite (line 376) already handles the error path ## Test plan - Existing tests pass (app-router.test.ts, isr-cache.test.ts) - Build successful - The fix is minimal and follows the pattern described in the issue --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 13:11:34 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#1014
No description provided.