Commit bc753559 authored by Winnie Hellmann's avatar Winnie Hellmann

Handle errors in successful notes reply

parent 0625ccc6
...@@ -268,11 +268,20 @@ export const saveNote = ({ commit, dispatch }, noteData) => { ...@@ -268,11 +268,20 @@ export const saveNote = ({ commit, dispatch }, noteData) => {
const { errors } = res; const { errors } = res;
const commandsChanges = res.commands_changes; const commandsChanges = res.commands_changes;
if (hasQuickActions && errors && Object.keys(errors).length) { if (errors && Object.keys(errors).length) {
eTagPoll.makeRequest(); /*
The following reply means that quick actions have been successfully applied:
$('.js-gfm-input').trigger('clear-commands-cache.atwho'); {"commands_changes":{},"valid":false,"errors":{"commands_only":["Commands applied"]}}
Flash(__('Commands applied'), 'notice', noteData.flashContainer); */
if (hasQuickActions) {
eTagPoll.makeRequest();
$('.js-gfm-input').trigger('clear-commands-cache.atwho');
Flash(__('Commands applied'), 'notice', noteData.flashContainer);
} else {
throw new Error(__('Failed to save comment!'));
}
} }
if (commandsChanges) { if (commandsChanges) {
......
---
title: Handle errors in successful notes reply
merge_request: 28082
author:
type: fixed
...@@ -4196,6 +4196,9 @@ msgstr "" ...@@ -4196,6 +4196,9 @@ msgstr ""
msgid "Failed to remove user key." msgid "Failed to remove user key."
msgstr "" msgstr ""
msgid "Failed to save comment!"
msgstr ""
msgid "Failed to save merge conflicts resolutions. Please try again!" msgid "Failed to save merge conflicts resolutions. Please try again!"
msgstr "" msgstr ""
......
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