The key verse is 2 Timothy 3:16.
In the early church: “The scriptures were not the only ancient writings that were believed to be inspired by God.”
So what’s inspired and what’s not?
Kalin has shown that “in the early church inspiration applied not only to all scripture, but also to the Christian community, as it bore ‘living witness of Jesus Christ.’ Only heresy was considered to be non-inspired, because it was contrary to this witness.”
This is the same basis on which Paul rejected “another gospel” even if “an angel from heaven” preached it (Gal 1:8). And for Luther “the true test” is: “What does not preach Christ is not apostolic, even though St. Peter or Paul taught it; again, what preaches Christ would be apostolic, even though Judas, Annas, Pilate, or Herod did it” (LW 35:396).
Therefore 2 Timothy 3:16 is wrongly used wherever it is used to claim that the Bible is verbally inerrant. Read more here.