I am working with a server that will return server side error messages in HTML but also have a response status of 200.
jqXHR.getAllResponseHeaders() returns
This is problematic since I need to check the X-SAS-STP-ERROR value
The RemoteTransport class has this important processing kernel in kendo.data.js:
Thanks,
Richard
jqXHR.getAllResponseHeaders() returns
Server: Apache-Coyote/1.1X-Powered-By: Servlet 2.4; JBoss-4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)/JBossWeb-2.0x-ua-compatible: IE=EmulateIE7X-SAS-STP-ERROR: -34Cache-Control: no-cache, no-storeContent-Type: text/html;charset=UTF-8Transfer-Encoding: chunkedDate: Fri, 11 Jan 2013 15:17:29 GMTThe RemoteTransport class has this important processing kernel in kendo.data.js:
result = cache.find(options.data);if(result !== undefined) { success(result);} else { options.success = function(result) { cache.add(options.data, result); success(result); // I AM HERE }; $.ajax(options);} at the I AM HERE point the success handler is dispatched but is passed only the result, and thus the handler is missing the statusText and jqXHR (which are available as arguments[1] and arguments[2]).
So my issue is thus:
- Is there a better place to hook in my checks for X-SAS-STP-ERROR: -34 ?
- Should I patch the kendoui library to dispatch with success(result,arguments[1],arguments[2]) ?
- If the check for -34 asserts true is there a way the success handler can prevent/reject default success handling henceforth ?So my issue is thus:
- Is there a better place to hook in my checks for X-SAS-STP-ERROR: -34 ?
- Should I patch the kendoui library to dispatch with success(result,arguments[1],arguments[2]) ?
Thanks,
Richard