To go back to the original question

it seems there’s something there around the word ‘able’. ‘Able’ implies what God can do, and since God is omnipotent, God can do anything.
However ‘able’ is not the same as ‘did’. God gives us free will. We all choose when, and the extent to which we co-operate with God. Therefore, to say ‘the Holy Spirit was unable to prevent error’ is untrue, but there may be an argument to say ‘the Holy Spirit did not prevent error’, because human beings got in the way.
We’re human. We mess up. Peter messed up. Paul messed up. Moses messed up. But in the context of a discerning community, Scripture got put together.
Now, I don’t believe it’s inconceivable, that our passion and our clarity, and our commitment is not always uniform. As the Church got larger, as there were no longer living witnesses to Christ, as Christianity became a state religion (by which it was possible to benefit), the clarity of that discernment may have changed.
So, if you ask me, who has authority? God. God alone. The perfect Church? There isn’t one. Only God is perfect. The job of Christians is to do their level best, under the guidance of the Holy Spirit, to follow faithfully. At least that’s what I think