exception if err on GLM is nan