PDA

View Full Version : Store exception doesn't fire



MattiV
4 Dec 2011, 1:32 AM
Hi!

I'm rather new to Sencha and having trouble with catching story proxy exceptions. For some reason, this exception event doesn't fire when the ajax response is 403 (session incorrect).

The load event is fires just fine (in case it's fine to only fire if the json is correct)


app.gamesStore = new Ext.data.Store({ model: 'gamesList',
proxy: {
type: 'ajax',
url : domain+'x_games',
reader: {
type: 'json',
root: 'games'
}
},
autoLoad: true,
listeners: {
load: function(proxy, response, operation) {
alert("load");
},
exception:function(proxy, response, operation){
alert("exception");
}
}
});




Is it something simple and stupid, and I have misunderstood something? Sometimes I really feel myself lost with the docs, so a response in English instead of a URL to the docs would be preferred ;)

mitchellsimoens
5 Dec 2011, 1:59 PM
So when the status is 403, the load event fires and not the exception?

MattiV
7 Dec 2011, 3:14 AM
No, there is no event fired at all... No load nor the exception.

Izhaki
26 Jan 2012, 5:18 AM
The exception event is for the proxy, not the store.