EXT.Ajax.request going to success when JSON returns "success" : false
ajax, extjs, javascript
Solution
It would call failure handler only when request would failed on the network level - if you get server error or server won't return anything. Otherwise it will be success and you need to parse response to see if it was logical failure.
Problem
I have this EXT JS code: ``` Ext.Ajax.request({ url : "xxx", method : "POST", params : params, success : function(response) { success(); }, failure : function(){ fail(); } }); ``` The url `xxx` returns this piece of JSON. ``` {"success": false } ``` For some reason this never goes into failure. It never runs the `fail()` method, always `success()`. What's going wrong?