A parent has ultimate control and influence over a child in the infant and pre-school years. A parent should take maximum advantage of that, and do the best they can to instill values, provide a good example (whoever said "monkey see monkey do" was spot on), and build a good relationship with the child. A child in a good relationship with a parent will want to do what the parent wants, provided there is positive reinforcement.
Then when a child enters school, the parent's influence and control begins to decrease, obviously more so as the child grows. A parent should do whatever can be done to maintain appropriate structure and insure safety as long as it doesn't become excessively intrusive. That point is where the parent needs to trust they've done the best they can, and hope for the best. That's all any parent can do. Every child has different temperaments, personalities, and some have issues that are beyond the parent's control, so there must be adjustment for that.
To answer the question more directly, it depends on the mistake. Even the best kids do stupid stuff, and they just need to learn better on their own by experiencing the consequences. That's life, and teaching a kid to deal with it. But if a kid does something s/he shouldn't over and over, there's something going on, and it likely originates in the family.