Hi,
Is there a way to get the HTTP Status and Code every on Ajax exception?
Below is my code that overrides the Ext.data.Operation setException method to get the other error information that I need.
Code:
(function() {
var originalException = Ext.data.Operation.prototype.setException;
Ext.override(Ext.data.Operation, {
setException: function(error) {
var errorInfo = {
time: errorTime.format('Y-m-d H:i:sO'),
url: this.request.url,
method: this.request.method,
params: this.request.params
// httpStatus: ?????
// httpCode: ?????
}
localStorage.setItem('errorLog', Ext.encode(errorInfo);
originalException.apply(this, arguments);
}
});
})();