Skip to content

Commit

Permalink
catch
Browse files Browse the repository at this point in the history
  • Loading branch information
uriva committed Feb 15, 2024
1 parent e4c4469 commit c7d954b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ const abstractCache = <F extends Func>({
const keyResult = key(...x);
return read(keyResult).catch(() =>
f(...x).then((y) => {
enrollPromise(write(keyResult, y));
enrollPromise(
write(keyResult, y).catch((e) => {
console.error("failed writing to rmmbr cache", e);
}),
);
return y;
})
);
Expand Down

0 comments on commit c7d954b

Please sign in to comment.