I don’t know if it was in a cathedral or not when he said it, but it was a pope, talking about a matter of faith and religion. And he was very fallible after all.
If you’re going to criticize the concept of Papal infallibility, you might want to actually know what it means.