From 5e0217bcb13597173fef292f7931a3a161853fe4 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Mon, 4 Mar 2024 11:04:13 +0500 Subject: [PATCH] web: allow clearing database on `database disk image is malformed` --- apps/web/src/components/error-boundary/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/error-boundary/index.tsx b/apps/web/src/components/error-boundary/index.tsx index 2a3d715bf..3e8db053e 100644 --- a/apps/web/src/components/error-boundary/index.tsx +++ b/apps/web/src/components/error-boundary/index.tsx @@ -153,7 +153,8 @@ function getErrorHelp(props: FallbackProps) { const errorText = errorToString(error); if ( errorText.includes("file is not a database") || - errorText.includes("unsupported file format") + errorText.includes("unsupported file format") || + errorText.includes("database disk image is malformed") ) { return { explanation: `This error usually means the database file is either corrupt or it could not be decrypted.`,