Consciousness of error is, to a certain extent, a consciousness of understanding; and correction of error is the plainest proof of energy and mastery.
So the reason that the Bay of Pigs failed was that the original promise made by Eisenhower was not kept by the subsequent Administration. It allowed hostile air to wipe out the approaching invasion force.