- if (res == null || res.data == null || _this13.utilsService.isValidJSON(res.data) == false) {
- deferred.reject("ApplicationsService::syncRolesEcompFromExtAuthSystem Failed");
+ if (res == null || res.data == null || _this13.utilsService.isValidJSON(res.data) == false || res.data.status == 'ERROR') {
+ deferred.reject("ApplicationsService::syncRolesEcompFromExtAuthSystem Failed" + res.data.message);