oData Model submitChanges error callback function not executed

709 Views Asked by At

I would like to know when I use the submitChanges of sap.ui.model.odata.v2.ODataModel, and have a success and error callback function. Even if the request failed the success handler gets called.

My code example is below:

onSave: function() {                            
    this.getModel().submitChanges({
        success: function(oData, oReponse) { 
            //Do something for success                      
        },
        error: function(oError) { 
            //Do something for error
        }
    });                                 
}
0

There are 0 best solutions below