diff --git a/web/pgadmin/static/scss/_alert.scss b/web/pgadmin/static/scss/_alert.scss index e8676b8c..f5082c37 100644 --- a/web/pgadmin/static/scss/_alert.scss +++ b/web/pgadmin/static/scss/_alert.scss @@ -21,7 +21,8 @@ display: inline-block; } -.alert.alert-info { +.alert.alert-info, +.alert.alert-danger { padding: 0.5rem; } diff --git a/web/pgadmin/tools/grant_wizard/static/js/grant_wizard.js b/web/pgadmin/tools/grant_wizard/static/js/grant_wizard.js index 85d78da2..ee9e0c45 100644 --- a/web/pgadmin/tools/grant_wizard/static/js/grant_wizard.js +++ b/web/pgadmin/tools/grant_wizard/static/js/grant_wizard.js @@ -612,6 +612,18 @@ define([ $('.wizard-progress-bar p').html(''); $('.wizard-progress-bar').hide(); }, + error: function(m, xhr) { + let msg; + if (xhr && xhr.responseJSON && xhr.responseJSON.errormsg) { + msg = xhr.responseJSON.errormsg; + } + + if(!msg) { + msg = gettext('Unable to fetch the database objects due to an error'); + } + $('.wizard-progress-bar p').removeClass('alert-info').addClass('alert-danger'); + $('.wizard-progress-bar p').text(msg); + }, reset: true, }, this);