Javascript sencha extjs中表单提交失败的处理

Javascript sencha extjs中表单提交失败的处理,javascript,extjs,extjs4.2,Javascript,Extjs,Extjs4.2,我正在尝试处理表单提交中的400个错误请求,这是我的代码 var form = Ext.DomHelper.append(document.body, { tag : 'form', method : formMethod, target : formTarget, action : formAction, children : formChildren }); document.body.

我正在尝试处理表单提交中的400个错误请求,这是我的代码

    var form = Ext.DomHelper.append(document.body, {
        tag : 'form',
        method : formMethod,
        target : formTarget,
        action : formAction,
        children : formChildren
    });

    document.body.appendChild(form);
    form.submit({
        success: function(form, action) {
            console.log(success)
        },

        // If you don't pass success:true, it will always go here
        failure: function(form, action) {
            alert('Failed');
        }
    });
    document.body.removeChild(form);
我也尝试了try-and-catch,但仍然无法处理错误。 你能帮忙吗