Ayesha reported,

The Prophet ﷺ was struck by pain one night and began to groan and toss about on his bed.Ayesha remarked, "If one of us did this, you would hold it against him."The Prophet ﷺ replied, "The righteous are tested severely. No misfortune befalls a believer, even the prick of a thorn or anything greater, without an offense being wiped away from him because of it, and a degree being raised for him by it."

Azami 3417

Sahih

عن عائشة

أن النبي ﷺ طرقه وجع، فجعل يشتكي ويتقلب على فراشه. فقالت عائشة: لو صنع هذا بعضنا لوجدت عليه! فقال النبي ﷺ: إن الصالحين يشدد عليهم، وإنه لا يصيب مؤمنا نكبة من شوكة فما فوق ذلك إلا حطت به عنه خطيئة، ورفع بها درجة.

الأعظمي 3417صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Funerals
Chapter
Patience in tribulation and illness
Section
Reward of the believer for what afflicts him of illness, grief, or the like
Numbering
Jami al-Kamil 3417 (2nd edition)
Azami 3417