err was undefined