Question: Some people, including heretics, claim that the prophets and messengers might have made mistakes like all humans, they are liable to err e.g. Cain, the son of Aadam, murdered his brother Abel, when the two angels came to David (Daawood), he listened to the first and did not listen to what the second had to say, the story of Yoonus (John) when the whale swallowed him, and the story of the Messenger with Zayd ibn Haarithah. They say that he concealed something which he should have declared openly. Similarly, he once said to some of his companions, “You know better about your worldly affairs,” after giving advice that proved harmful, thus he made a mistake in this regard. His account with the blind man as referred to in the Aayah: (The Prophet صلى الله عليه وسلم) frowned and turned away. Because there came to him the blind man (i.e. ‘Abdullaah bin Umm-Maktoom, who came to the Prophet صلى الله عليه وسلم while he was preaching to one or some of the Quraysh chiefs). Did the prophets and messengers really make mistakes? How can we respond to the sinners who say these things?
Answer: Yes, the prophets and messengers might have made some mistakes, but Allaah did not approve of their mistakes. Rather, He pointed out their mistakes as Mercy to them and their nations, forgave their mistakes, and accepted their repentance as Grace and Mercy, for Allaah is Oft-Forgiving, Most Merciful… read more here.