Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Handle legacy recovery open 404s

Neeraj Gupta1db72c4d5f0c
diff --git a/web/apps/legacy/src/pages/index.tsx b/web/apps/legacy/src/pages/index.tsx
index 278d4ac62f..2eb79fde50 100644
--- a/web/apps/legacy/src/pages/index.tsx
+++ b/web/apps/legacy/src/pages/index.tsx
@@ -52,6 +52,11 @@ const slotLabels: Record<SlotID, string> = {
const slotNumbers: Record<SlotID, number> = { first: 1, second: 2 };
+const inactiveLegacyKitRequestPaths = [
+ "/legacy-kits/recovery/challenge",
+ "/legacy-kits/recovery/open",
+];
+
const getErrorMessage = (error: unknown) =>
error instanceof Error
? error.message
@@ -64,7 +69,9 @@ const isInactiveLegacyKitError = (error: unknown) => {
return (
message.includes("legacy kit not found") ||
(message.includes("http 404") &&
- message.includes("/legacy-kits/recovery/challenge"))
+ inactiveLegacyKitRequestPaths.some((path) =>
+ message.includes(path),
+ ))
);
};