IMHO you did not fail as a parent.

Bad things can happen to good people.

Not trying to be cliche about it either.