The study of hadith is a topic of its own and cannot be summed up so lightly and flippantly without detailed study into the field.
The collectors of hadith have dedicated their entire lives to this task alone.
They have collected hundreds of thousands of hadiths and as such there is a grading system of hadiths.
You might find this thread beneficial
http://www.islamicboard.com/refutations/52543-your-basic-guide-hadith-learners.html
Its really quite interesting and amazing how these hadiths were collected and organised and cannot be explained easily without serious study into this.
And to get back onto the topic of this thread.
The Prophets’ task was to convey the message from Allaah even though they were human, hence the issue of infallibility may be examined from two angles:
1 – Infallibility in conveying the message
2 – Infallibility from human error
Firstly:
With regard to the first issue, the Prophets were infallible in conveying the message from Allaah. They did not conceal anything that Allaah had revealed to them, and they did not add anything from themselves. Allaah said to His Prophet Muhammad (peace and blessings of Allaah be upon him) (interpretation of the meaning):
“O Messenger (Muhammad)! Proclaim (the Message) which has been sent down to you from your Lord. And if you do not, then you have not conveyed His Message. Allaah will protect you from mankind”
[al-Maa'idah 5:67]
“And if he (Muhammad) had forged a false saying concerning Us (Allaah),
We surely would have seized him by his right hand (or with power and might),
And then We certainly would have cut off his life artery (aorta),
And none of you could have withheld Us from (punishing) him”
[al-Haaqqah 69:44-47]
So with regard to conveying the religion of his Lord, the Prophet (peace and blessings of Allaah be upon him) did not make any mistakes at all, whether major or minor, rather he was infallible and under the constant protection of Allaah.
Secondly:
With regard to the Prophets as people, they may make mistakes. This may be discussed as follows
1 –They do not commit major sins
With regard to major sins, the Prophets do not commit major sins at all, and they are protected from such major sins both before their missions began or afterwards.
2 – Matters that have nothing to do with conveying the message and the revelation.
With regard to minor sins, these may be committed by them, or by some of them. Hence the majority of scholars are of the view that they are not infallible when it comes to minor sins. But if they committed such actions they were not left to persist therein, rather Allaah pointed that out to them and they hastened to repent therefrom
3 – Unintentional mistakes with regard to some worldly matters
With regard to mistakes in some worldly matters, it is permissible for them to make such mistakes although their reason is sound and their insight is strong. This happened to several of the Prophets including our Prophet Muhammad (peace and blessings of Allaah be upon him). This happened with regard to various spheres of life such as medicine, agriculture, etc
Here is the link for a more thorough reading of this issue
http://islamqa.com/index.php?ref=42216&ln=eng&txt=muhammad%20infallible
