If is difficult to take the gospels as perfect truth due to flashbulb memories. The Gospels were written many years after Jesus's death, meaning that some events could become forgotten or misremembered. Even Gospel writers who had personal experience with Jesus would have forgotten at least some details, looking back so far into the past. While the Gospel writers may believe that there is truth to their works, their memories are blurred by the passage of time.
The authors of the Gospels are also affected by the following:
"False memories; hindsight bias; the characteristics of eyewitness memory; collective memory; and confabulation."
For example, hindsight bias could be another factor in the unreliable nature of some Gospel writings. The Gospel writers are describing events after realizing that Jesus was the Messiah (at least to the new Christians). Therefore, they are looking back at the events of Jesus's life with bias.