Mistake is a relative term. Sometimes the problem is whoever is perceiving the mistake. Just don't internalize the negative feedback. Act on it as best as possible and move on.
Plenty of times I have done the "wrong" thing and taken shit for it because those around me didn't want to rock the boat even if in the long term the wrong thing was actually the right thing.
I don't know what your situation is but it is important to not lose your internal compass and intuitions about what is right.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.