CADI AAF Integration and merging the code
[portal.git] / ecomp-portal-FE-common / client / app / services / users / users.service.js
index dc415c4..9e06271 100644 (file)
             }).then( res => {
                 // this.$log.debug('getUserAppRoles response: ', JSON.stringify(res))
                 // If response comes back as a redirected HTML page which IS NOT a success
-                if (this.utilsService.isValidJSON(res)== false) {
-                    deferred.reject('UsersService::updateUserAppRoles: Failed');
+                if (this.utilsService.isValidJSON(res)== false ||  res.data.httpStatusCode == '500' || res.data.status == 'ERROR') {
+                    deferred.reject('UsersService::updateUserAppRoles: Failed'  + res.data.message);
                 } else {
                     // this.$log.info('UsersService::updateUserAppRoles: Succeeded');
                     deferred.resolve(res.data);