fix error messages on invalid response to stores
[roojs1] / Roo / data / HttpProxy.js
index b31fc6b..9d6f402 100644 (file)
@@ -29,9 +29,6 @@
 Roo.data.HttpProxy = function(conn){
     Roo.data.HttpProxy.superclass.constructor.call(this);
     // is conn a conn config or a real conn?
-    Roo.log('httpproxy:conn');
-    Roo.log(conn);
-            ')
     this.conn = conn;
     this.useAjax = !conn || !conn.events;
   
@@ -106,19 +103,13 @@ Roo.extend(Roo.data.HttpProxy, Roo.data.DataProxy, {
                 callback : this.loadResponse,
                 scope: this
             };
-            if (this.conn.timeout) {
-                Roo.log('setting timeout to ' + this.conn.timeout);
-                o.timeout = this.conn.timeout;
-            }
             if(this.useAjax){
-                Roo.log("using ajax");
                 Roo.applyIf(o, this.conn);
                 if(this.activeRequest){
                     Roo.Ajax.abort(this.activeRequest);
                 }
                 this.activeRequest = Roo.Ajax.request(o);
             }else{
-                Roo.log("not using ajax");
                 this.conn.request(o);
             }
         }else{
@@ -139,7 +130,13 @@ Roo.extend(Roo.data.HttpProxy, Roo.data.DataProxy, {
             result = o.reader.read(response);
         }catch(e){
             this.fireEvent("loadexception", this, o, response, e);
-            o.request.callback.call(o.request.scope, null, o.request.arg, false);
+            o.request.callback.call(o.request.scope, {
+                    success : false,
+                    raw : {
+                        errorMsg : response.responseText
+                    }
+                    
+                }, o.request.arg, false);
             return;
         }