Added error param to return