The difference between 'error' and 'mistake' is in the context that they are used in. A 'mistake' is usually accidental, you know it is wrong. Otherwise, an 'error' is usually made due to the lack of knowledge and is more formal than 'mistake'.
"Machines never make mistakes, but rather they make errors. People can make both."