diff --git a/lib/shared/addon/components/cluster-driver/driver-import-aks/component.js b/lib/shared/addon/components/cluster-driver/driver-import-aks/component.js index 2a6ce1a603..c0381f7b6f 100644 --- a/lib/shared/addon/components/cluster-driver/driver-import-aks/component.js +++ b/lib/shared/addon/components/cluster-driver/driver-import-aks/component.js @@ -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, {