Renames project from pz2utils4jsf to mkjsf
[mkjsf-moved-to-github.git] / src / main / java / com / indexdata / pz2utils4jsf / errors / ErrorHelper.java
index c80c366..086cd84 100644 (file)
@@ -121,18 +121,24 @@ public class ErrorHelper implements Serializable {
             + "that a pazpar2 service is running at the given address." + nl);\r
         break;           \r
       case PAZPAR2_ERRORS:\r
-        if (error.hasPazpar2Error()) {\r
-          String pz2code = error.getPazpar2Error().getCode();\r
+        if (error.hasPazpar2Error()) {          \r
+          int pz2code = Integer.parseInt(error.getPazpar2Error().getCode());\r
           switch (pz2code) {\r
-            case "3":\r
-              suggestions.add("Query terms not supported.");\r
+            case 3:\r
+              suggestions.add("The search experienced a problem with the query terms.");\r
               break;\r
-            case "12":\r
+            case 12:\r
               suggestions.add("The Pazpar2 server does not have a service defined by the requested ID ");\r
               suggestions.add("Please check the service ID set in the configuration and compare it with the " +\r
                   " configuration on the Pazpar2 server-side.");\r
               addConfigurationDocumentation(suggestions);    \r
-              break;          \r
+              break;\r
+            case 100:\r
+              suggestions.add("Pazpar2 Service Proxy error");\r
+              suggestions.add("A request was made to the Pazpar2 Service Proxy, but the Service Proxy reports ");\r
+              suggestions.add(" that authentication is lacking. Could be no successful authentication request was made or");\r
+              suggestions.add(" that the Service Proxy session timed out.");\r
+              break;\r
             default:\r
               suggestions.add("Pazpar2 error: " + error.getPazpar2Error().getMsg() + " (Pazpar2 # "+error.getPazpar2Error().getCode()+")");\r
           }\r
@@ -145,7 +151,7 @@ public class ErrorHelper implements Serializable {
         break;       \r
       case NOT_RESOLVED:\r
         suggestions.add("Sorry, no troubleshooting suggestions were written for this error scenario just yet.");\r
-        break;\r
+        break;                \r
     }\r
     return suggestions;\r
   }\r