He notoriously kept numerous mistress and was denounced by his successor Julius II who said: ""I will not live in the same rooms as the Borgias lived. He desecrated the Holy Church as none before. He usurped the papal power by the devil's aid, and I forbid under the pain of excommunication anyone to speak or think of Borgia again. His name and memory must be forgotten. It must be crossed out of every document and memorial. His reign must be obliterated. All paintings made of the Borgias or for them must be covered over with black crepe. All the tombs of the Borgias must be opened and their bodies sent back to where they belong to Spain."
The same goes for Pope Honorius I who taught the heresy of Monothelitism. He was condemned by name with the consent of his successor Pope Agatho at the Sixth Ecumenical Council.
And with these we define that there shall be expelled from the holy Church of God and anathematized Honorius who was some time Pope of Old Rome, because of what we found written by him to Sergius, that in all respects he followed his view and confirmed his impious doctrines. We have also examined the synodal letter of Sophronius of holy memory, some time Patriarch of the Holy City of Christ our God, Jerusalem, and have found it in accordance with the true faith and with the Apostolic teachings, and with those of the holy approved Fathers. Therefore we have received it as orthodox and as salutary to the holy Catholic and Apostolic Church, and have decreed that it is right that his name be inserted in the diptychs of the Holy Churches. www.newadvent.org
Then you have Pope Nicholas III who Dante mocked as being in hell because he engaged in simony, the sale of Church offices. en.wikipedia.org
If by the Roman Church you mean its head or pontiff, it is beyond question that he can err even in matters touching the faith. He does this when he teaches heresy by his own judgement or decretal. In truth, many Roman pontiffs were heretics. The last of them was Pope John XXII.
Pope Adrian VI