What would you do if someone at your place of work felt the need to call you stupid over a mistake you made?

Just curious. It happened to me recently. The person who said that was reprimanded for it, but now I just have a difficult time talking to him. I actively avoid him.
Updates
4 mo
Wtf gag this needs to be in career/education not relationships
What would you do if someone at your place of work felt the need to call you stupid over a mistake you made?
Post Opinion