Skip to content

Commit

Permalink
update error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
0oM4R committed Sep 17, 2023
1 parent e1a2e2d commit a7d2174
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion v2go2tgrid/tfgrid/deployer.v
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ pub fn(mut d Deployer) get_node_pub_config(node_id u32) !PublicConfig {
node_twin := d.get_node_twin(node_id)!
res := os.execute("grid-cli rmb-node-pubConfig --substrate ${d.substrate_url} --mnemonics \"${d.mnemonics}\" --relay ${d.relay_url} --dst ${node_twin} ")
if res.exit_code != 0 {
return error(res.output)
return error(res.output.trim_space())
}

public_config := json.decode(PublicConfig,res.output) or {
Expand Down
3 changes: 1 addition & 2 deletions v2go2tgrid/tfgrid/examples/deploy_gw_fqdn.v
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ fn main() {
node_id := u32(11)
logger.info('trying to get node ${node_id} public configuration')
deployer.get_node_pub_config(node_id) or {
logger.error(err.str())
logger.error('please select another node')
logger.error('please select another node: ${err}')
exit(1)
}
logger.info('preparing the deployment..')
Expand Down

0 comments on commit a7d2174

Please sign in to comment.