diff options
author | 2017-09-11 19:32:19 +0530 | |
---|---|---|
committer | 2017-09-11 19:32:19 +0530 | |
commit | b80d5df69fb3281feac4db3ae7bf2e842605f061 (patch) | |
tree | 0f4531d55a5bff557c5f841d6db7cb4dd7cb7db3 /utils/test/testapi/3rd_party/static/testapi-ui/components | |
parent | e19f03540368a5d3f78e6a2d856a91cf52892414 (diff) |
Handle error in front-end
Handle the error and show appropriate message,
without showing the entire error to the users
Change-Id: Ib5213190efc1e87d56a7329a4572b525a5e16a12
Signed-off-by: thuva4 <tharma.thuva@gmail.com>
Diffstat (limited to 'utils/test/testapi/3rd_party/static/testapi-ui/components')
-rw-r--r-- | utils/test/testapi/3rd_party/static/testapi-ui/components/pods/podsController.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/utils/test/testapi/3rd_party/static/testapi-ui/components/pods/podsController.js b/utils/test/testapi/3rd_party/static/testapi-ui/components/pods/podsController.js index 894fcc152..8015becde 100644 --- a/utils/test/testapi/3rd_party/static/testapi-ui/components/pods/podsController.js +++ b/utils/test/testapi/3rd_party/static/testapi-ui/components/pods/podsController.js @@ -88,11 +88,12 @@ 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{ |