From 7b770e19f0127e27b8f5f548a159460c74711c5c Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 18 Aug 2021 16:15:53 +0800 Subject: [PATCH] fix error messages on invalid response to stores --- Roo/data/HttpProxy.js | 2 +- docs/src/Roo_data_HttpProxy.js.html | 8 +++++++- docs/src/Roo_data_Store.js.html | 3 ++- roojs-all.js | 5 +++-- roojs-bootstrap-debug.js | 2 +- roojs-bootstrap.js | 2 +- roojs-debug.js | 11 +++++++++-- roojs-ui-debug.js | 11 +++++++++-- roojs-ui.js | 5 +++-- 9 files changed, 36 insertions(+), 13 deletions(-) diff --git a/Roo/data/HttpProxy.js b/Roo/data/HttpProxy.js index 3183b70361..9d6f402e54 100644 --- a/Roo/data/HttpProxy.js +++ b/Roo/data/HttpProxy.js @@ -133,7 +133,7 @@ Roo.extend(Roo.data.HttpProxy, Roo.data.DataProxy, { o.request.callback.call(o.request.scope, { success : false, raw : { - errorMsg : response + errorMsg : response.responseText } }, o.request.arg, false); diff --git a/docs/src/Roo_data_HttpProxy.js.html b/docs/src/Roo_data_HttpProxy.js.html index 55557c9179..7cf5d1a3cd 100644 --- a/docs/src/Roo_data_HttpProxy.js.html +++ b/docs/src/Roo_data_HttpProxy.js.html @@ -130,7 +130,13 @@ 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 + } + + }, o.request.arg, false); return; } diff --git a/docs/src/Roo_data_Store.js.html b/docs/src/Roo_data_Store.js.html index 1b20d5347f..1a6c65733e 100644 --- a/docs/src/Roo_data_Store.js.html +++ b/docs/src/Roo_data_Store.js.html @@ -378,7 +378,8 @@ // private // Called as a callback by the Reader during a load operation. loadRecords : function(o, options, success){ - if(!o || success === false){ + + if(!o){ if(success !== false){ this.fireEvent("load", this, [], options, o); } diff --git a/roojs-all.js b/roojs-all.js index fe124c1f42..1e86893359 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -923,7 +923,7 @@ for(var i=0,B=A.length;i