As much as I know,"mistake" and error have the same meaning but they are used in different situation.Both of them mean that something is happened incorrectly.
We use "mistake" when we do something wrong and we have a knowledge about that or when the result of our performance is not desireable.
ex:buying this cellphone was a big mistake .it does not work properly.
" Errors" are usually made due to the lack of knowledge .Something which is wrong because it is against the rules or models or codes and etc.
ex: She wrote " they has a child" ; that is an error.she should write " they have a child".
besides,"mistake" is less formal than "error" and mostly use in daily speaking.