Split out the two error cases for clarity