Its really hard to explain. The reason why your first example is wrong has to do with the fact that the part that comes after "to make sure of" is negated with "no." If you take out the no the sentence will read fine. It definitely won't make actual sense, but will make grammatical sense.
If you're making sure of something, you're affirming its validity. I guess you can't validate no error, but you can validate the nonexistence of error.
"To make sure of the nonexistence of obvious, foolish errors" makes grammatical sense. (I think)
I may very well be mistaken.