From bc4f79847da0ab080854f920e43495dd096a6448 Mon Sep 17 00:00:00 2001 From: Jim McGee Date: Thu, 2 Jul 2026 13:16:10 -0400 Subject: [PATCH] Add catch for freshValue promise resolution The primary path can/should still propagate an error, but this path should just no-op rejections, otherwise downstream you can get unhandledRejection --- src/cachified.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cachified.ts b/src/cachified.ts index 5581476..83e8cd2 100644 --- a/src/cachified.ts +++ b/src/cachified.ts @@ -81,7 +81,7 @@ export async function cachified( // here we inform past calls that we got a response if (pendingValues.has(key)) { const { resolve } = pendingValues.get(key)!; - freshValue.then((value) => resolve(value)); + freshValue.then((value) => resolve(value)).catch(() => {}); } pendingValues.set(key, {