Skip to content

Commit 7c0364c

Browse files
authored
Chore(load deployments): (#4135)
- add loggs for debugging - add optional chaining
1 parent db6ad06 commit 7c0364c

File tree

1 file changed

+5
-3
lines changed
  • packages/grid_client/src/modules

1 file changed

+5
-3
lines changed

packages/grid_client/src/modules/base.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,9 +512,9 @@ class BaseModule {
512512
message: workload.result.message,
513513
flist: data.flist,
514514
publicIP: (await this._getMachinePubIP(deploymentName, deployments, data.network.public_ip)) as PublicIPResult,
515-
planetary: data.network.planetary ? resultData.planetary_ip : resultData.ygg_ip,
516-
myceliumIP: data.network.mycelium?.hex_seed ? resultData.mycelium_ip : "",
517-
interfaces: data.network.interfaces.map(n => ({
515+
planetary: data.network?.planetary ? resultData?.planetary_ip : resultData?.ygg_ip,
516+
myceliumIP: data.network?.mycelium?.hex_seed ? resultData?.mycelium_ip : "",
517+
interfaces: data.network?.interfaces.map(n => ({
518518
network: n.network,
519519
ip: n.ip,
520520
})),
@@ -621,6 +621,8 @@ class BaseModule {
621621
deployment = await this.rmb.request([node_twin_id], "zos.deployment.get", payload);
622622
} catch (e) {
623623
(e as Error).message = formatErrorMessage(`Failed to get deployment`, e);
624+
console.error(e);
625+
continue;
624626
}
625627
let found = false;
626628
for (const workload of deployment.workloads) {

0 commit comments

Comments
 (0)