From 54c60ebb4fcdf44f1385b9a2cce7b25217fdac9b Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Wed, 17 Nov 2021 22:17:45 +0100 Subject: [PATCH] Treat "file is not a database" as database corruption --- ts/sql/errors.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/ts/sql/errors.ts b/ts/sql/errors.ts index 9dc00d6f43..1666511bbf 100644 --- a/ts/sql/errors.ts +++ b/ts/sql/errors.ts @@ -5,6 +5,7 @@ export function isCorruptionError(error?: Error): boolean { return ( error?.message?.includes('SQLITE_CORRUPT') || error?.message?.includes('database disk image is malformed') || + error?.message?.includes('file is not a database') || false ); }