Skip to content

Commit

Permalink
fix: unhandled rejection in concurrent requests
Browse files Browse the repository at this point in the history
  • Loading branch information
dlenroc committed May 22, 2024
1 parent 86cfa97 commit b97c010
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function extend(
const result = (value as any)(this.executor, ...args);
if (result instanceof Promise) {
cache.set(cacheKey, result);
result.finally(() => cache.delete(cacheKey));
result.catch(() => {}).finally(() => cache.delete(cacheKey));
}

return result;
Expand Down

0 comments on commit b97c010

Please sign in to comment.