They are the same, but since "error" is French, and "mistake' is Anglo-Saxon, the former is used in academic contexts, the latter generally in daily speech.
E.g. "Error Analysis in Native Speakers of Farsi."
E.g. "Sorry, I made a mistake."
Student or Learner