the error of one's ways
noun phraseDefinition of the error of one's ways
: one's wrong actions or bad behavior
Congress saw/recognized the error of its ways and repealed the law. He publicly acknowledged the error of his ways and asked for forgiveness.