added error code for actions