Abdullâh ibn Amr ibn al-‘Aass رضي الله عنه reports:
I used to write whatever I heard from the Holy Prophet ﷺ and wanted to learn it by heart. Some people of the Quraysh dissuaded me and said, “Do you write everything you hear from the Holy Prophet, while he is a human being and sometimes he may be in anger as any other human beings may be?”
They meant that the Holy Prophet might say something in a state of anger which he did not seriously intend. So, one should be selective in writing his ahâdîth. ‘Abdullâh ibn ‘Amr رضي الله عنه conveyed their opinion to the Holy Prophet. In reply, the Holy Prophet ﷺ pointed to his lips and said,
I swear by the One in whose hands is the soul of Muhammad: nothing comes out from these two (lips) except truth. So, do write.
[Sunan Abu Dâwud; Tabaqât ibn Sa’d; Mustadrik-ul-Hâkim]