CADI AAF Integration and merging the code
[portal.git] / ecomp-portal-FE-common / client / app / services / applications / applications.service.js
index 75fc7fe..c595c71 100644 (file)
               }).then( res => {
                      // If response comes back as a redirected HTML page which IS NOT a success
                        // But don't declare an empty list to be an error.
-                     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);
                      } else {
                          deferred.resolve(res);
                      }