Abu Hurairah reported,

I heard the Messenger of Allah ﷺ say, "O Allah, Muhammad is only a human being. He becomes angry just as any human becomes angry. I have taken a covenant with You that You will never break with me. So whichever believer I have harmed, insulted, or flogged, make it an expiation for him and a means of drawing him closer to You on the Day of Resurrection."

Muslim 6622

Sahih

حدثنا قتيبة بن سعيد حدثنا ليث عن سعيد بن أبي سعيد عن سالم مولى النصريين قال سمعت

أبا هريرة يقول

ا سمعت رسول الله ﷺ يقول اللهم إنما محمد بشر يغضب كما يغضب البشر وإني قد اتخذت عندك عهدا لن تخلفنيه فأيما مؤمن آذيته أو سببته أو جلدته فاجعلها له كفارة وقربة تقربه بها إليك يوم القيامة

مسلم 6622صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Righteousness, maintaining ties, and good manners
Chapter
Whoever the Prophet ﷺ cursed, reviled, or supplicated against
Numbering
Darussalam 6622
Muslim 6622