From Sahih Muslim (Hadith 6624):
Abu Huraira reported Allah's Messenger (ﷺ) as saying:I have held covenant with Thee which Thou wouldst not break, so for any believer whom I curse or beat, make that an expiation on the Day of Resurrection
Reference: Muslim 6624