diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js index b9fc45186..91495f4bf 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js @@ -199,10 +199,6 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery displaySuccessMessage($.i18n.prop('managedrepository.updated',self.managedRepository.id())); activateManagedRepositoriesGridTab(); self.managedRepository.modified(false); - }, - error: function(data) { - var res = $.parseJSON(data.responseText); - displayRestError(res); } } ); diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/startup.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/startup.js index ae2ce0582..3d0fa332b 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/startup.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/startup.js @@ -36,11 +36,12 @@ function() { clearUserMessages(); displayErrorMessage($.i18n.prop('authz.karma.needed')); }, - 500: function(){ + 500: function(data){ removeSmallSpinnerImg(); removeMediumSpinnerImg("#main-content"); clearUserMessages(); - displayErrorMessage($.i18n.prop('error.500')); + displayRestError($.parseJSON(data.responseText)); + //displayErrorMessage($.i18n.prop('error.500')); } } }); diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js index 9581a24bb..77a76ba97 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js @@ -281,7 +281,7 @@ require(["jquery","jquery.tmpl","i18n"], function(jquery,jqueryTmpl,i18n) { * if not error is displayed in #user-messages div */ displayRestError=function(data,idToAppend){ - + $.log("displayRestError"); if (data.redbackRestError){ displayRedbackError(archivaRestError,idToAppend) } @@ -308,7 +308,7 @@ require(["jquery","jquery.tmpl","i18n"], function(jquery,jqueryTmpl,i18n) { if (data.errorKey && data.errorKey.length>0){ displayErrorMessage($.i18n.prop( data.errorKey ),idToAppend); } else { - $.log("data.errorMessage:"+data.errorMessage); + $.log("print data.errorMessage:"+data.errorMessage); displayErrorMessage(data.errorMessage,idToAppend); }