Skip to content

Commit 59dd560

Browse files
committed
fix(webapp): swallow the aborted sibling fetch in the realtime merge
When the two-table realtime shape merge returns as soon as one upstream shape yields, it aborts the other fetch and returns immediately. That promise was left without a rejection handler, so the abort could surface as an unhandled rejection on the server. Attach a no-op catch to the aborted fetch.
1 parent 3d4ca9e commit 59dd560

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

apps/webapp/app/services/realtimeClient.server.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,10 @@ export class RealtimeClient {
482482
const firstRes = first === "a" ? aRes! : bRes!;
483483
if (actionable(firstRes)) {
484484
(first === "a" ? ctlB : ctlA).abort();
485+
// The aborted sibling fetch rejects once the abort propagates; attach a
486+
// no-op catch so it doesn't surface as an unhandled rejection after we
487+
// have already returned.
488+
void (first === "a" ? pB : pA).catch(() => {});
485489
return first === "a"
486490
? mergeParsedShapes(aRes!, unpolledShape("b", prior), prior)
487491
: mergeParsedShapes(unpolledShape("a", prior), bRes!, prior);

0 commit comments

Comments
 (0)