The Church teaches that there are no errors in Sacred Scripture on any subject about which Scripture makes an assertion:
Just my two cents.
I do not disagree with the wisdom of the popes (well, I don’t dare to disagree), but at times I do think that a number of people - especially in the West (I’ll admit I have a sort of bias here) - have a rather narrow idea of what is ‘truth’ and what is ‘error’. I can see this among some anti-Christian atheists and even some Christians as well: they equate ‘truth’ with bare, objective, scientifically-verifiable or whatever ‘fact’ / ‘reality’. If something does not totally square up with this bare ‘fact’, the baby is thrown with the bathwater - it’s accused of being in ‘error’.
In other words, they seem to assume that the gospels are an exact transcript of ‘what happened’, and that for the gospels to be ‘true’ then it must mean that everything happened
100% exactly as it is written down: when say, a gospel says Jesus said this, then Jesus said it exactly as in the script, no word more, no word less.*
I’ll try to give an example. Let’s say a Mr. Smith is recorded on paper as saying the words: “I am thinking of going down to the basement. Do you want to come with me?” On the ‘fact’ level, let’s say what Mr. Smith actually said was something like: “So, I … I’m, uh, thinkin’ of goin’ down to, erm, to the basement - ya wanna come with me?” Of course, to be precise what he actually said, his choice of words, is not exactly the same as that on paper (non-lexical utterances like ‘uh’ or ‘erm’, for one

), so on the one level, what was recorded on paper isn’t 100% ‘factual’. But no one would argue that the text still captures the meaning and the spirit of what Mr. Smith said accurately (he was going to the basement and he was inviting the addressee to come with him), so in a way, what is written on the text is still ‘true’, even if not completely ‘accurate’ to the ‘fact’.
Of course, you run into a difficulty with this ‘gospels as scripts’ type of thinking when you see that the four gospels don’t exactly match up and have their differences from one another, when you find out that there are textual variants in the New Testament, when you realize that the gospels are written in a language likely different from the one Jesus actually spoke.
This I think is what really drives some people to accuse the gospels of being in ‘error’: they have this mental picture in their heads that the gospels must specifically be like this or that in order to be ‘true’, and they have an overly-simplistic, black-and-white worldview: if it’s not completely factual / historically accurate / whatever (as they define those terms), then it’s completely false, erratic, worthless. When they find out that the actual case isn’t as simplistic as they thought, they then accuse the gospels of falsehood. But, I wonder: what if it’s actually their definition of what constitutes ‘truth’ and ‘error’ that’s faulty here?
Some folks might think I’m splitting hairs here, my idea of the gospels is that while they may not be 100% ‘factual’ (in the sense that are not like dry transcripts or dispassionate video footage), they have complete ‘truth’. I do believe what the Church says: there is no error in the gospels.