File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
app/server/static/components Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -264,7 +264,13 @@ export default {
264264 })
265265 .catch ((error ) => {
266266 console .log (error); // eslint-disable-line no-console
267- this .messages .push (' You cannot use same label name or shortcut key.' );
267+ if (error .response .data .non_field_errors ) {
268+ error .response .data .non_field_errors .forEach ((msg ) => {
269+ this .messages .push (msg);
270+ });
271+ } else {
272+ this .messages .push (' You cannot use same label name or shortcut key.' );
273+ }
268274 });
269275 },
270276
@@ -312,7 +318,13 @@ export default {
312318 })
313319 .catch ((error ) => {
314320 console .log (error); // eslint-disable-line no-console
315- this .messages .push (' You cannot use same label name or shortcut key.' );
321+ if (error .response .data .non_field_errors ) {
322+ error .response .data .non_field_errors .forEach ((msg ) => {
323+ this .messages .push (msg);
324+ });
325+ } else {
326+ this .messages .push (' You cannot use same label name or shortcut key.' );
327+ }
316328 });
317329 },
318330
You can’t perform that action at this time.
0 commit comments