View Full Version : Handling Ext.Ajax.request(....) errors gracefully

18 Jul 2013, 9:51 AM
I have a situation where I know the "Ext.Ajax.reques(...)" call is going to fail and the server is going to return an error with some additional data.

This error gets logged on the console. The error is intentional and expected hence I want to handle the error gracefully and not have it logged on the console (as an error).

Any ways to do this?


18 Jul 2013, 7:09 PM
I assume from what you've said that the server is using the response status code to communicate that there has been an error?

If so, you should be able to handle the error by specifying a failure callback for the request.

If you're using error status codes then some browsers will log them to the console. There's not a lot ExtJS can do about that.

19 Jul 2013, 7:56 AM
I have specified a callback and a failure handler. But the error is logged on the console. I think it is the browser and not ExtJS that is logging to the console. Thanks for confirming that.