Skip to content

Commit d98d169

Browse files
leshniakclaude
andcommitted
fix: add fallback label in getBudgetedHealErrorLabel
Avoid silently mislabeling future error categories as connection lost. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6445eaa commit d98d169

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/storage/providers/IDBKeyValProvider/createStore.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ function isBudgetedHealError(error: unknown): boolean {
3333
return isBackingStoreError(error) || isConnectionLostError(error);
3434
}
3535

36-
function getBudgetedHealErrorLabel(error: unknown): 'backing store' | 'connection lost' {
37-
return isBackingStoreError(error) ? 'backing store' : 'connection lost';
36+
function getBudgetedHealErrorLabel(error: unknown): string {
37+
if (isBackingStoreError(error)) return 'backing store';
38+
if (isConnectionLostError(error)) return 'connection lost';
39+
return 'unknown';
3840
}
3941

4042
// This is a copy of the createStore function from idb-keyval, we need a custom implementation

0 commit comments

Comments
 (0)