return immediately on error