In my code I am trying to update Account record. But the update is failed, how do i handle the error in my lightning component.
I tried this in helper:
var state = response.getState();
if(state=="SUCCESS"){
}else if(state=="ERROR"){
var errors = response.getError();
// setting this error to on of the attribute of the component
}
NOTE: addError method @ field level in apex method cannot be handled in lightning. One of the limitations with respect to handling errors in lightning