Errors happen in Science. It’s part of the whole process and method. Sometimes Science needs to walk through all paths while looking for its way to Truth. And most of those paths necessarily lead to errors.
Very often they are not done on purpose or wanted. They are usually triggered by wishful thinking, lack of review or trivial oversights.
I still remember my youth’s “Reanalysis of the Eötvös experiment” (Fischbach’s quest for the fifth force) and “Electrochemically induced nuclear fusion of deuterium” (Fleischmann’s and Pons’ cold fusion).
A few other times those error smell like being done on purpose and somehow wanted for objectives that fall out of the science range but rather attain economic goals. “e-Cat” (Rossi’s cold fusion) is my favorite example.
In the former case one can be indulgent (while still truth driven), in the latter one the actors need to be publicly disgraced, over and over until they evaporate away in a haze of shame!
In the end… “It’s the Science, Baby. The Science. There’s nothing you can do about it. Nothing … luckily!” (Humphrey “Galileo” Bogart).