Things go wrong from time to time. People sometimes 'do the wrong thing' - sometimes by choice, other times by error or accident. In every case there can be value in making multilevel responses to the problem at hand.
1. Contain the problem to minimise further harm.
2. Repair the situation (working with the parties involved if possible)
3. Learn how the problem occurred (focus on process before people)
4. Prevent (or reduce the likelihood of) the problem recurring
There is a tendency to blame the person who 'caused the problem' and/or to change the system. Improve the system/process only if necessary. Often nothing needs to be changed. Blame is usually unproductive - the person who 'caused the problem' often simply lacked some key insight, understanding, knowledge or skill. Work with them to bring them up to speed.
And, try to avoid the use of counter-measures such a increased control and supervision, extra requirements, needing permission, new restrictions... Counter measures are often costly to implement and difficult to maintain.
Restorative practices are a good example of a multilevel response when someone has 'done the wrong thing'.