diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-08-08 11:29:32 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2016-08-08 11:29:32 +0200 |
commit | 0d9ae4cc8308965fd0f638218f2026573bbc2051 (patch) | |
tree | 34d6fd3619e23eee1cb0b39f6970371653945200 /server/sonar-web/src/main/js/apps/project-admin/links/views/DeletionModal.js | |
parent | 864b32a022faf7a476573edf8d66b0daffd578f3 (diff) | |
download | sonarqube-0d9ae4cc8308965fd0f638218f2026573bbc2051.tar.gz sonarqube-0d9ae4cc8308965fd0f638218f2026573bbc2051.zip |
SONAR-7920 apply feedback
Diffstat (limited to 'server/sonar-web/src/main/js/apps/project-admin/links/views/DeletionModal.js')
-rw-r--r-- | server/sonar-web/src/main/js/apps/project-admin/links/views/DeletionModal.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/server/sonar-web/src/main/js/apps/project-admin/links/views/DeletionModal.js b/server/sonar-web/src/main/js/apps/project-admin/links/views/DeletionModal.js index a1064dfb66e..ee27fd38d01 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/links/views/DeletionModal.js +++ b/server/sonar-web/src/main/js/apps/project-admin/links/views/DeletionModal.js @@ -20,6 +20,7 @@ import ModalForm from '../../../../components/common/modal-form'; import Template from './DeletionModalTemplate.hbs'; import { deleteLink } from '../../../../api/projectLinks'; +import { parseError } from '../../../code/utils'; export default ModalForm.extend({ template: Template, @@ -33,11 +34,9 @@ export default ModalForm.extend({ this.trigger('done'); this.destroy(); }) - .catch(function (e) { - e.response.json().then(r => { - this.showErrors(r.errors, r.warnings); - this.enableForm(); - }); + .catch(e => { + parseError(e).then(msg => this.showSingleError(msg)); + this.enableForm(); }); }, |