Skip to content

Commit 6ea86e6

Browse files
refactor: Remove silent error suppression for persistent history storage operations.
1 parent 1457047 commit 6ea86e6

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

packages/sds/src/message_channel/persistent_history.ts

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,11 @@ export class PersistentHistory implements ILocalHistory {
101101
if (!this.storage) {
102102
return;
103103
}
104-
try {
105-
const payload = JSON.stringify(
106-
this.memory.slice(0).map(serializeContentMessage)
107-
);
108-
this.storage.setItem(this.storageKey, payload);
109-
} catch {
110-
// Ignore persistence errors (e.g. quota exceeded).
111-
}
104+
105+
const payload = JSON.stringify(
106+
this.memory.slice(0).map(serializeContentMessage)
107+
);
108+
this.storage.setItem(this.storageKey, payload);
112109
}
113110

114111
private load(): void {
@@ -130,11 +127,7 @@ export class PersistentHistory implements ILocalHistory {
130127
this.memory.push(...messages);
131128
}
132129
} catch {
133-
try {
134-
this.storage.removeItem(this.storageKey);
135-
} catch {
136-
// Ignore cleanup errors.
137-
}
130+
this.storage.removeItem(this.storageKey);
138131
}
139132
}
140133
}

0 commit comments

Comments
 (0)