Update download project error messages
This commit is contained in:
1 file changed
+4
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user