Abu Hurairah reported,

The Prophet ﷺ said, "O Allah, I make a covenant with You that You will not break for me. I am only a human being, so whichever believer I have harmed, insulted, cursed, or lashed, make it for him a prayer, a purification, and a means of drawing him near to You on the Day of Resurrection."

Muslim 6619

Sahih

حدثنا قتيبة بن سعيد حدثنا المغيرة يعني ابن عبد الرحمن الحزامي عن أبي الزناد عن الأعرج

عن أبي هريرة

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

مسلم 6619صحيح
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 6619
Muslim 6619