diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index bb4051628..bd2b44e54 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -596,16 +596,18 @@ const PostStatusForm = { ? this.postHandler : statusPoster.postStatus - postHandler(postingOptions).then((data) => { - if (!data.error) { + postHandler(postingOptions) + .then((data) => { this.abandonDraft() this.clearStatus() this.$emit('posted', data) - } else { - this.error = data.error - } - this.posting = false - }) + }) + .catch((error) => { + this.error = error + }) + .finally(() => { + this.posting = false + }) }, previewStatus() { if (this.emptyStatus && this.newStatus.spoilerText.trim() === '') {