Check for the right error return value