Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/grid_client/src/primitives/nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ class Nodes {
return tfclient.contracts
.get({ id: contractId })
.then(contract => {
if (!contract) {
throw new ValidationError(`Contract with ID ${contractId} not found or has been deleted.`);
}
if (!contract.contractType) {
throw new ValidationError(`Contract with ID ${contractId} has no contract type.`);
}
if (contract.contractType.nameContract)
throw new ValidationError(`Couldn't get node id for this contract ${contractId}. It's a name contract.`);
return contract.contractType?.nodeContract?.nodeId || contract.contractType?.rentContract?.nodeId;
Expand Down
3 changes: 3 additions & 0 deletions packages/playground/src/weblets/tf_staticwebsite.vue
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ async function deploy() {
if (domain.value) {
if (!selectionDetails.value?.domain?.enableSelectedDomain) {
vm[0].customDomain = selectionDetails.value?.domain?.customDomain;
finalize(vm);
return;
}

Expand All @@ -239,11 +240,13 @@ async function deploy() {
network: vm[0].interfaces[0].network,
});
finalize(vm);
return;
} catch (e) {
layout.value.setStatus("deploy", "Rollbacking back due to fail to deploy gateway...");

await rollbackDeployment(grid!, name.value);
layout.value.setStatus("failed", normalizeError(e, "Failed to deploy a Static Website instance."));
return;
}
}
finalize(vm);
Expand Down