.controller('PodsController', PodsController);
PodsController.$inject = [
- '$rootScope', '$scope', '$http', '$filter', '$state', 'testapiApiUrl','raiseAlert'
+ '$scope', '$http', '$filter', '$state', 'testapiApiUrl','raiseAlert'
];
/**
details: ctrl.details
};
ctrl.podsRequest =
- $http.post(pods_url, body).error(function (error) {
+ $http.post(pods_url, body).error(function (data, status) {
ctrl.showError = true;
- ctrl.error =
- 'Error creating the new pod from server: ' +
- angular.toJson(error);
+ if(status == 403){
+ ctrl.error =
+ 'Error creating the new pod from server: Pod\'s name already exists'
+ }
});
}
else{
ctrl.showError = true;
- ctrl.error = 'Name is missing.'
+ ctrl.error = 'Name is missing.'
}
}