X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fcom%2Findexdata%2Fpz2utils4jsf%2Ferrors%2FErrorHelper.java;h=0664f20e2a4124c267fc9386418155de04a54728;hb=332204f1699f9b7d5714d7e5c49dbe8edaf94d32;hp=874c50fe6330baa24a9f84edd37ffaaa85375ffc;hpb=f0a5fe08c40f0271e6dbce2367b330dbf7afbc9a;p=mkjsf-moved-to-github.git diff --git a/src/main/java/com/indexdata/pz2utils4jsf/errors/ErrorHelper.java b/src/main/java/com/indexdata/pz2utils4jsf/errors/ErrorHelper.java index 874c50f..0664f20 100644 --- a/src/main/java/com/indexdata/pz2utils4jsf/errors/ErrorHelper.java +++ b/src/main/java/com/indexdata/pz2utils4jsf/errors/ErrorHelper.java @@ -121,19 +121,19 @@ public class ErrorHelper implements Serializable { + "that a pazpar2 service is running at the given address." + nl); break; case PAZPAR2_ERRORS: - if (error.hasPazpar2Error()) { - String pz2code = error.getPazpar2Error().getCode(); + if (error.hasPazpar2Error()) { + int pz2code = Integer.parseInt(error.getPazpar2Error().getCode()); switch (pz2code) { - case "3": + case 3: suggestions.add("Query terms not supported."); break; - case "12": + case 12: suggestions.add("The Pazpar2 server does not have a service defined by the requested ID "); suggestions.add("Please check the service ID set in the configuration and compare it with the " + " configuration on the Pazpar2 server-side."); addConfigurationDocumentation(suggestions); break; - case "100": + case 100: suggestions.add("Pazpar2 Service Proxy error"); suggestions.add("A request was made to the Pazpar2 Service Proxy, but the Service Proxy reports "); suggestions.add(" that authentication is lacking. Could be no successful authentication request was made or"); @@ -151,7 +151,7 @@ public class ErrorHelper implements Serializable { break; case NOT_RESOLVED: suggestions.add("Sorry, no troubleshooting suggestions were written for this error scenario just yet."); - break; + break; } return suggestions; }