Added error action and ability to return an error from opt out actions