Add descriptive message for archive import failure

This commit is contained in:
Andrew Eisenberg
2020-06-11 14:33:14 -07:00
parent d360153d69
commit 4680614455

View File

@@ -158,7 +158,11 @@ export async function importArchiveDatabase(
);
}
} catch (e) {
showAndLogErrorMessage(e.message);
if (e.message.includes("unexpected end of file")) {
showAndLogErrorMessage("Database is corrupt or too large. Try unzipping outside of VS Code and importing the unzipped folder instead.");
} else {
showAndLogErrorMessage(e.message);
}
}
return item;
}