The Sahaabah are the best of the ummah after its Prophet, but they are not #infallible
The Sahaabah (may Allah be pleased with them) were human beings and some of them committed sins and make mistakes, but on the whole they are the best of mankind after the Prophets and Messengers, and they are the best of generations, and all of them are trustworthy and of good character according to the consensus of the Muslims. But, also according to consensus, they were not infallible and free from sin, and with regard to what was narrated about some of them having committed a sin or having been warned about committing a sin, we should think of them in the best manner with regard to that and understand that this does not mean that he is not of good character or that Allah is not pleased with him.
Rather Abu Muhammad Ibn Hazm (may Allah have mercy on him) said:
All the Sahaabah are definitively people of Paradise. Allah, may He be exalted, says (interpretation of the meaning):
“Not equal among you are those who spent and fought before the conquering (of Makkah with those among you who did so later). Such are higher in degree than those who spent and fought afterwards. But to all, Allâh has promised the best (reward)”
[al-Hadeed 57:10]
“Verily those for whom the good has preceded from Us, they will be removed far therefrom (Hell)”
[al-Anbiya’ 21:101].
And it is proven that all of them are among the people of Paradise. End quote.
Quoted from him by al-Ameer al-San‘aani in Tawdeeh al-Afkaar li Ma‘aani Tanqeeh al-Anzaar, 2/245
At the time of the Prophet (blessings and peace of Allah be upon him) there were a number of the hypocrites who used to pray with him and fast and worship Allah outwardly, but in fact they were hypocrites. Allah says (interpretation of the meaning):
“And among the bedouins round about you, some are hypocrites, and so are some among the people of Al-Madinah, who persist in hypocrisy; you (O Muhammad ﷺ) know them not, We know them. We shall punish them twice, and thereafter they shall be brought back to a great (horrible) torment”
[al-Tawbah 9:101].