Skip to content

Commit 6484ec1

Browse files
committed
fix: improve DB hydration error handling to ignore expected "no such table" message
1 parent 6926031 commit 6484ec1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/objectql/src/protocol.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1237,7 +1237,10 @@ export class ObjectStackProtocolImplementation implements ObjectStackProtocol {
12371237
}
12381238
}
12391239
} catch (e: any) {
1240-
console.warn(`[Protocol] DB hydration skipped: ${e.message}`);
1240+
// "no such table" is expected on first run before migrations execute — not an error.
1241+
if (!/no such table/i.test(e.message ?? '')) {
1242+
console.warn(`[Protocol] DB hydration skipped: ${e.message}`);
1243+
}
12411244
}
12421245
return { loaded, errors };
12431246
}

0 commit comments

Comments
 (0)