Skip to content

Commit

Permalink
fix azure error message formatting (#5152)
Browse files Browse the repository at this point in the history
  • Loading branch information
mantis-toboggan-md committed Jul 10, 2024
1 parent a7302e0 commit 60b713b
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,14 @@ export default Component.extend(ClusterDriver, {
cb(true);
}
} catch (err) {
errors.pushObject(`Failed to load Clusters from Azure: ${ err.message }`);
let msg = ''

if (err.message){
msg = err.message
} else if (err?.body?.error){
msg = err.body.error
}
errors.pushObject(`Failed to load Clusters from Azure: ${ msg }`);

// Azure List Clusters API fails sometimes to list this, user cnn input a cluster name though so dont fail
setProperties(this, {
Expand Down

0 comments on commit 60b713b

Please sign in to comment.