21 Moreover, our predecessor, sweeping aside all such distinctions between what these critics are pleased to call primary and secondary elements, says in no ambiguous fashion that "those who fancy that when it is a question of the truth of certain expressions we have not got to consider so much what God said as why He said it," are very far indeed from the truth. He also teaches that Divine inspiration extends to every part of the Bible without the slightest exception, and that no error can occur in the inspired text: "It would be wholly impious to limit inspiration to certain portions only of Scripture or to concede that the sacred authors themselves could have erred."
Source: Spiritus Paraclitus (Vatican.va)