From 7a9b62c1144a44509d69e4bed9ed77b4cb9aa5d0 Mon Sep 17 00:00:00 2001 From: Michael Di Prisco Date: Mon, 9 Dec 2024 10:43:19 +0100 Subject: [PATCH] fix: promise errors are now thrown correctly --- src/internal.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/internal.ts b/src/internal.ts index 01d980c..92adfc1 100644 --- a/src/internal.ts +++ b/src/internal.ts @@ -491,7 +491,10 @@ export async function letsCandidate({ staleMap, HookPayload }) - ); + ).catch((error: Error) => { + runningQueryCache.delete(key); + throw error; + }); return execution; }