Update download project error messages

This commit is contained in:
Thomas Weber committed 2021-08-31 23:33:14 -05:00
1 parent b27ce80997
commit 42eb34d2ed
1 file changed
+4 -1
+4 -1
View File
@@ -289,9 +289,12 @@ const downloadProject = async (data, progressCallback) => {
zip = await JSZip.loadAsync(data);
} catch (e) {
console.warn(e);
throw new Error('Cannot parse project');
throw new Error('Cannot parse project: not a zip or sb');
}
const projectDataFile = zip.file('project.json');
if (!projectDataFile) {
throw new Error('project.json is missing');
}
const projectDataText = await projectDataFile.async('text');
const projectData = JSON.parse(projectDataText);
type = identifyProjectType(projectData);