Better syntax error message when saving script

This commit is contained in:
Zaid Abdulla committed 2021-01-24 14:17:31 -08:00
1 parent 7594883404
commit 6cca59c666
3 files changed
+36 -8

No files matched your search

+7 -1
View File
@@ -85,7 +85,13 @@ function putActionHandler(action, _object, isNew): Promise<ValidationErrors> {
store.fulfill(0, Date.now());
resolve();
})
.catch(reject);
.catch((err) => {
if (err["code"] === 400 && err["response"]) {
reject(new Error(err["response"]));
return;
}
reject(err);
});
})
.catch(reject);
} else if (action === "delete") {