Good article. I have an honest doubt and not trying to nitpick.
I have some training in statistics and believe the usage of 'Error' and 'Residuals' in the article should not be synonymous.
IMHO,
Error : Error pertains to the Data Generating process. It is actually the difference between the observed values and the 'unobservable true value' of the quantity of interest (such as population mean).
An example: Imagine we have a theoretical value of 'ideal circumference of a baseball ball'. Lets say it is 8 cm. Now a factory manufacturing the baseball ball does not always manufacture it to perfection of 8cm. it could be 7.95, 7.83 cm or 8.01, 8.09 etc. This difference from theoretical value of 8cm is the Error.
Residuals: Residuals happen because of estimation i.e. us 'fitting a model' . Basically it is the difference between observed and predicted values. Perhaps we talk about sample mean here. We hope that the sample mean is a good estimator of the 'theoretical and unobservable' population mean.
The two are not the same in my opinion.
Would love to hear your thoughts.