Skip to content

Commit 668b62b

Browse files
author
Daniel Borkan
committed
Add error checking
1 parent 89e59f4 commit 668b62b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/cloud/install/installer.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,13 @@ class CloudInstaller {
5757
// to the install script.
5858
if (line.indexOf(INVITATION_PREFIX) === 0) {
5959
const inviteJson = line.substring(INVITATION_PREFIX.length);
60-
F(JSON.parse(inviteJson));
60+
try {
61+
F(JSON.parse(inviteJson));
62+
} catch (e) {
63+
R({
64+
message: 'could not parse invite: ' + inviteJson
65+
});
66+
}
6167
}
6268
});
6369

0 commit comments

Comments
 (0)