Holy Scripture became inerrant by and as a result of the Decree of Pope St. Damasus 1 at the Council of Rome in 382 A.D.
See:
home.inreach.com/bstanley/canon.htm
Why? because of Matthew 16:15-19
Mat 16:15 He said to them, “But who do you say that I am?”
Mat 16:16 Simon Peter replied, “You are the Christ, the Son of the living God.”
Mat 16:17 And Jesus answered him, "Blessed are you, Simon Bar-Jona! For flesh and blood has not revealed this to you, but my Father who is in heaven.
Mat 16:18 And I tell you, you are Peter, and on this rock I will build my church, and the powers of death shall not prevail against it.
Mat 16:19 I will give you the keys of the kingdom of heaven, and
whatever you bind on earth shall be bound in heaven, and whatever you loose on earth shall be loosed in heaven."
Also see:
call2holiness.org/ScriptureAlone/ScriptureAlone.htm