an object lesson
An actual, concrete example of something. Your overreaction was an object lesson in how to ensure that your kids don't tell you the truth.
an ˈobject lesson
a practical example of what you should or should not do in a particular situation: It was an object lesson in how not to make a speech. He did absolutely everything wrong.An object lesson was a school lesson that used real objects as a way of teaching in a very direct and practical way.