exit 1 if error is not EINVALID