mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
rejecting promises if erroring out
This commit is contained in:
@@ -83,6 +83,7 @@ export default
|
|||||||
hdr: 'Error!',
|
hdr: 'Error!',
|
||||||
msg: 'Failed to get inventory name. GET returned status: ' +
|
msg: 'Failed to get inventory name. GET returned status: ' +
|
||||||
response.status });
|
response.status });
|
||||||
|
deferred.reject('Could not resolve pendo role.');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return deferred.promise;
|
return deferred.promise;
|
||||||
@@ -110,6 +111,7 @@ export default
|
|||||||
hdr: 'Error!',
|
hdr: 'Error!',
|
||||||
msg: 'Failed to get inventory name. GET returned status: ' +
|
msg: 'Failed to get inventory name. GET returned status: ' +
|
||||||
response.status });
|
response.status });
|
||||||
|
deferred.reject('Could not resolve pendo config.');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if(config.analytics_status !== 'off'){
|
else if(config.analytics_status !== 'off'){
|
||||||
@@ -127,8 +129,12 @@ export default
|
|||||||
var options = that.setPendoOptions(config);
|
var options = that.setPendoOptions(config);
|
||||||
that.setRole(options).then(function(options){
|
that.setRole(options).then(function(options){
|
||||||
$pendolytics.identify(options);
|
$pendolytics.identify(options);
|
||||||
|
}, function(reason){
|
||||||
|
// reject function for setRole
|
||||||
|
$log.debug(reason);
|
||||||
});
|
});
|
||||||
}, function(reason){
|
}, function(reason){
|
||||||
|
// reject function for getConfig
|
||||||
$log.debug(reason);
|
$log.debug(reason);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user