Error inference for nonparametric regression