added error wrapper to action invoke