I HOPE YOU KNOW THAT YOU DON'T "COMMIT" A MISTAKE!
This is an interesting one because, once again, the source (fuente) of the problem comes from a translation from Spanish. In Spanish, it is possible to "cometer errores" but in English this approach does not really work.
In general, the best way to express this is by saying: "I have MADE a mistake". In English, we always "make" mistakes! Very important to learn that one. We use the verb "to commit" in association with a crime. So, for example: "He committed burglary". You can also use "to commit" or "commitment" as way of translating "compromiso".
Hope that helps!
Soy el director de Daniel Smith + Partners. Tengo más de 10 años de experiencia enseñando inglés a españoles.