feat: be more lenient on sync

This commit is contained in:
2026-05-01 15:26:54 +02:00
parent f602e08b5a
commit f4836a6fa2

View File

@@ -81,6 +81,7 @@ export async function pullChanges(): Promise<void> {
}; };
for (const change of changes) { for (const change of changes) {
try {
const data = typeof change.payload === 'string' const data = typeof change.payload === 'string'
? JSON.parse(change.payload) ? JSON.parse(change.payload)
: change.payload; : change.payload;
@@ -89,6 +90,9 @@ export async function pullChanges(): Promise<void> {
} else { } else {
await applyUpsert(change.entity, data); await applyUpsert(change.entity, data);
} }
} catch {
// Skip malformed change; will not block remaining changes.
}
} }
await setLastVersion(server_version); await setLastVersion(server_version);
} }