Commit 1e3881b0 authored by Phil Hughes's avatar Phil Hughes Committed by Nick Thomas

Updated ajax error message with returned errors

parent 4d801a70
...@@ -247,15 +247,19 @@ Please check your network connection and try again.`; ...@@ -247,15 +247,19 @@ Please check your network connection and try again.`;
} else { } else {
this.reopenIssue() this.reopenIssue()
.then(() => this.enableButton()) .then(() => this.enableButton())
.catch(() => { .catch(({ data }) => {
this.enableButton(); this.enableButton();
this.toggleStateButtonLoading(false); this.toggleStateButtonLoading(false);
Flash( let errorMessage = sprintf(
sprintf( __('Something went wrong while reopening the %{issuable}. Please try again later'),
__('Something went wrong while reopening the %{issuable}. Please try again later'), { issuable: this.noteableDisplayName },
{ issuable: this.noteableDisplayName },
),
); );
if (data) {
errorMessage = Object.values(data).join('\n');
}
Flash(errorMessage);
}); });
} }
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment