]> source.dussan.org Git - archiva.git/commitdiff
add error message in case of error 500
authorOlivier Lamy <olamy@apache.org>
Thu, 21 Feb 2013 14:36:18 +0000 (14:36 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 21 Feb 2013 14:36:18 +0000 (14:36 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1448653 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/startup.js

index e40a1a310b90e2dea2ac8658efd71c8e7b2fbe40..a1df1613e9e1409e9d1f2a6aedfde3270a1f7a9d 100644 (file)
@@ -49,7 +49,12 @@ function(jquery,sammy,utils) {
         removeSmallSpinnerImg();
         removeMediumSpinnerImg("#main-content");
         clearUserMessages();
-        displayRestError($.parseJSON(data.responseText));
+        try {
+          displayRestError($.parseJSON(data.responseText));
+        } catch (e) {
+          //maybe not a json reponse
+          displayErrorMessage($.i18n.prop('error.500'));
+        }
       },
       204: function(){
         remoteLogInfo(null,"found 204:"+this.url);