From f909e8670e4bb7d3f793e8aee4b2f21cf27bd1d7 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 20 2020 11:06:25 +0000 Subject: Propagate the error message to the user when updating bugzilla overrides Up until now the error message was hidden in the web console... not very nice for the users. Now we include the error message(s) in the pop-up shown to the user if updating the bugzilla overrides failed. Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/themes/srcfpo/templates/repo_master_sidebar.html b/pagure/themes/srcfpo/templates/repo_master_sidebar.html index 9b6dac0..0c32261 100644 --- a/pagure/themes/srcfpo/templates/repo_master_sidebar.html +++ b/pagure/themes/srcfpo/templates/repo_master_sidebar.html @@ -306,7 +306,11 @@ return false; }, error: function(res) { - alert("Unable to update the bugzilla assignee(s)"); + var msg = ''; + if(res.responseJSON.errors){ + msg = ': ' + res.responseJSON.errors.join(', '); + } + alert("Unable to update the bugzilla assignee(s)" + msg); $('html').css('cursor', 'default'); $('#reset_assignees').attr('disabled', false); $('#update_assignees').attr('disabled', false);