Here are some points about divine messengers’ infallibility:
1- Some people refer to some verses of the Quran to question divine prophets’ infallibility. But the fact is that the warnings and admonitions in the verses do not contradict the infallibility of the messengers of God because these warnings could open the way for infallibility and prevent some exaggerations about prophets. Some companions of prophets exaggerated about their status and likens them to God and Quranic warnings to prophets are an emphasis that they were human beings.
2- Divine prophets must be infallible not in spreading the religion and its teachings and rulings but also with regard to sins, both major and minor sins, and even errors. The Quran says: “Say: ‘Allah alone has the conclusive proof. Had He willed, He would have guided you all.’” (Verse 149 of Surah Al-An’am)
Indeed, if prophets and imams are not infallible, wouldn’t there be contradiction in what they say and do? And could one say God has done everything to guide people if prophets were not infallible?
3- There is no inconsistency in infallibility of prophets and their supplications and asking for forgiveness because they see themselves in the presence of God and know that God sees everything they say and do. That is why they even feel embarrassed for actions that are not sins.
For example, if I cough at home, I don’t feel any embarrassment but that is not the case when I am speaking on a television show.