Why do I keep getting "error" when trying to check returns for errors?