Skip to content

Commit 16083a6

Browse files
authored
Merge 56a6b25 into e8ff8b8
2 parents e8ff8b8 + 56a6b25 commit 16083a6

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.changeset/shiny-houses-stare.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/app-check': patch
3+
---
4+
5+
Prevent App Check from logging "uncaught" cancelled promises. The cancelled promises are part of App Check's expected behavior, and their cancellation wasn't intended to produce errors or warnings. See issue #7805.

packages/app-check/src/proactive-refresh.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ export class Refresher {
6464
this.stop();
6565
try {
6666
this.pending = new Deferred();
67+
this.pending.promise.catch(_e => {
68+
/* ignore */
69+
});
6770
await sleep(this.getNextRun(hasSucceeded));
6871

6972
// Why do we resolve a promise, then immediate wait for it?
@@ -74,6 +77,9 @@ export class Refresher {
7477
this.pending.resolve();
7578
await this.pending.promise;
7679
this.pending = new Deferred();
80+
this.pending.promise.catch(_e => {
81+
/* ignore */
82+
});
7783
await this.operation();
7884

7985
this.pending.resolve();

0 commit comments

Comments
 (0)