Handled all actions error before entering function