bad example from which one can learn; negative example
Refers to a person or behavior that serves as a lesson by showing what not to do. Often used in educational, workplace, or parenting contexts.
His failure became a negative example for me to learn from.
That boss's attitude is instructive as an example of what not to do.