happy accident

happy accident

A mistake or unplanned event that results in a beneficial outcome or pleasant surprise. The creation of penicillin was a happy accident that resulted from Alexander Fleming's discovery of mold growing in his agar plates.
See also: accident, happy