diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-18 15:09:45 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-18 15:09:45 +0000 |
commit | aaf59610548d9b0fd01acfd50e831cbe519ecba2 (patch) | |
tree | b6505abedcd965ebae5118b504b185b63129dc4c /app/assets/javascripts/snippets/components/snippet_header.vue | |
parent | 1363ca12f1f07c634647cf55c4c16b7401098673 (diff) | |
download | gitlab-ce-aaf59610548d9b0fd01acfd50e831cbe519ecba2.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/snippets/components/snippet_header.vue')
-rw-r--r-- | app/assets/javascripts/snippets/components/snippet_header.vue | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/assets/javascripts/snippets/components/snippet_header.vue b/app/assets/javascripts/snippets/components/snippet_header.vue index 36ba6eeecbd..bbe4c33fa43 100644 --- a/app/assets/javascripts/snippets/components/snippet_header.vue +++ b/app/assets/javascripts/snippets/components/snippet_header.vue @@ -137,7 +137,10 @@ export default { mutation: DeleteSnippetMutation, variables: { id: this.snippet.id }, }) - .then(() => { + .then(({ data }) => { + if (data?.destroySnippet?.errors) { + throw new Error(data?.destroySnippet?.errors[0]); + } this.isDeleting = false; this.errorMessage = undefined; this.closeDeleteModal(); |