View Full Version : [OPEN-733] failureType undefined if JSON response does not contain errors object

15 Mar 2010, 2:39 PM
For version 3.1.1:

API doc of Ext.form.Action for property failureType sais:

"Failure type returned when server side processing fails and the result (http://www.extjs.com/forum/../deploy/dev/docs/output/Ext.form.Action.html#Ext.form.Action-result)'s success property is set to false.
In the case of a form submission, field-specific error messages may be returned in the result (http://www.extjs.com/forum/../deploy/dev/docs/output/Ext.form.Action.html#Ext.form.Action-result)'s errors property."

It is not clear, that an errors object MUST be past with the JSON response like:
{success: false, errors: {} }
to get the passed action.failureType set.

If you just respond with {success: false}, action.failureType will stay undefined.

This was also subject in forum thread: http://www.extjs.com/forum/showthread.php?t=76377 where a fix was reported fpr Ext JS 3.0.0.

I would regard this either a bug in the code for 3.1.1 or in the documentation ;)

Best regards,