Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
bc753559
Commit
bc753559
authored
May 03, 2019
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle errors in successful notes reply
parent
0625ccc6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
app/assets/javascripts/notes/stores/actions.js
app/assets/javascripts/notes/stores/actions.js
+13
-4
changelogs/unreleased/winh-notes-error-handling.yml
changelogs/unreleased/winh-notes-error-handling.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
app/assets/javascripts/notes/stores/actions.js
View file @
bc753559
...
@@ -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
)
{
/*
The following reply means that quick actions have been successfully applied:
{"commands_changes":{},"valid":false,"errors":{"commands_only":["Commands applied"]}}
*/
if
(
hasQuickActions
)
{
eTagPoll
.
makeRequest
();
eTagPoll
.
makeRequest
();
$
(
'
.js-gfm-input
'
).
trigger
(
'
clear-commands-cache.atwho
'
);
$
(
'
.js-gfm-input
'
).
trigger
(
'
clear-commands-cache.atwho
'
);
Flash
(
__
(
'
Commands applied
'
),
'
notice
'
,
noteData
.
flashContainer
);
Flash
(
__
(
'
Commands applied
'
),
'
notice
'
,
noteData
.
flashContainer
);
}
else
{
throw
new
Error
(
__
(
'
Failed to save comment!
'
));
}
}
}
if
(
commandsChanges
)
{
if
(
commandsChanges
)
{
...
...
changelogs/unreleased/winh-notes-error-handling.yml
0 → 100644
View file @
bc753559
---
title
:
Handle errors in successful notes reply
merge_request
:
28082
author
:
type
:
fixed
locale/gitlab.pot
View file @
bc753559
...
@@ -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 ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment