File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
grid_client/src/primitives Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,12 @@ class Nodes {
165165 return tfclient . contracts
166166 . get ( { id : contractId } )
167167 . then ( contract => {
168+ if ( ! contract ) {
169+ throw new ValidationError ( `Contract with ID ${ contractId } not found or has been deleted.` ) ;
170+ }
171+ if ( ! contract . contractType ) {
172+ throw new ValidationError ( `Contract with ID ${ contractId } has no contract type.` ) ;
173+ }
168174 if ( contract . contractType . nameContract )
169175 throw new ValidationError ( `Couldn't get node id for this contract ${ contractId } . It's a name contract.` ) ;
170176 return contract . contractType ?. nodeContract ?. nodeId || contract . contractType ?. rentContract ?. nodeId ;
Original file line number Diff line number Diff line change @@ -226,6 +226,7 @@ async function deploy() {
226226 if (domain .value ) {
227227 if (! selectionDetails .value ?.domain ?.enableSelectedDomain ) {
228228 vm [0 ].customDomain = selectionDetails .value ?.domain ?.customDomain ;
229+ finalize (vm );
229230 return ;
230231 }
231232
@@ -239,11 +240,13 @@ async function deploy() {
239240 network: vm [0 ].interfaces [0 ].network ,
240241 });
241242 finalize (vm );
243+ return ;
242244 } catch (e ) {
243245 layout .value .setStatus (" deploy" , " Rollbacking back due to fail to deploy gateway..." );
244246
245247 await rollbackDeployment (grid ! , name .value );
246248 layout .value .setStatus (" failed" , normalizeError (e , " Failed to deploy a Static Website instance." ));
249+ return ;
247250 }
248251 }
249252 finalize (vm );
You can’t perform that action at this time.
0 commit comments