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.`;
} else {
this.reopenIssue()
.then(() => this.enableButton())
.catch(() => {
.catch(({ data }) => {
this.enableButton();
this.toggleStateButtonLoading(false);
Flash(
sprintf(
let errorMessage = sprintf(
__('Something went wrong while reopening the %{issuable}. Please try again later'),
{ 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