Adding error case for errors