Tidy up other SP authentication message.
[mkws-moved-to-github.git] / src / mkws-core.js
index dd106f7..1de1711 100644 (file)
@@ -162,7 +162,7 @@ mkws.setMkwsConfig = function(overrides) {
 
   var config_default = {
     use_service_proxy: true,
-    pazpar2_url: "//mkws.indexdata.com/service-proxy/",
+    pazpar2_url:        "//mkws.indexdata.com/service-proxy/",
     service_proxy_auth: "//mkws.indexdata.com/service-proxy-auth",
     lang: "",
     sort_options: [["relevance"], ["title:1", "title"], ["date:0", "newest"], ["date:1", "oldest"]],
@@ -436,12 +436,13 @@ mkws.pagerNext = function(tname) {
 
     request.get(null, function(data) {
       if (!$.isXMLDoc(data)) {
-        alert("service proxy auth response document is not valid XML document, give up!");
+        alert("Service Proxy authentication response is not a valid XML document");
         return;
       }
       var status = $(data).find("status");
       if (status.text() != "OK") {
-        alert("service proxy auth response status: " + status.text() + ", give up!");
+        var message = $(data).find("message");
+        alert("Service Proxy authentication response: " + status.text() + " (" + message.text() + ")");
         return;
       }