I am trying to display apex catch exception error message in lightning message. I have tried below in helper. but it didn't work. And let me know how to call this from Lightning component.
Helper:
saveAction.setCallback(this,function(response){
if (response.getState() == "SUCCESS") {
component.set("v.isShow",false);
var opportunitId = response.getReturnValue();
window.location.href = "/"+opportunitId;
}
});
$A.enqueueAction(saveAction);
Lightning Controller:
saveRecord : function(component, event, helper)
{
helper.helperSave(component, event);
}