So yeah I have seen a situation where what the writer has put makes sense, but after thinking it through there are clear faults in the logic they used.
Here's my example
A small team is advancing to and organisation. The leader brings in an experienced person to act as their second in command and help build up the organisation.
The second in command gets upset when the leader does not follow the proper procedures when making a decision.
Now the second in command teaches the leader a lesson to get him to start doing the procedures properly.
This is all well and good except when the second in command goes to the extreme to teach him a lesson by abusing their authority and humiliating the leader in front of the team. The second in command doesn't even try and talk it out with the leader at all and just goes right to the extreme option.
Now it ends with the leader blaming themselves after what happens and learning the lesson, but here is the kicker the readers realise the procedures the second in command is upset for the leader not following were never established. The reason the leader never followed them is not their fault, but cause they were never there to begin with and were something the second in command expected the leader to follow, but never told the leader or the team that they were adding these procedures.
See what I mean at first the writer is giving message of a tough lesson learned and the second in command is doing it for the greater good. However once a reader thinks about it more carefully they realise faults in the logic used. This results in them getting annyoned cause the writer has made the leader out to be wrong and leaves it at that making the second in command the good guy. Yet while the story makes it out to be so the readers don't think so now that they noticed the faults.
This has resulted in readers calling it bad writing cause the reaction the author wants and is going for gets contradicted by what actually happens once thought through. I am wondering if anyone has any tips to avoid such a situation or how to fix it when it happens.