Abdullah bin Masud reported,

I came in to see the Messenger of Allah ﷺ while he was suffering from a fever. I said, "Messenger of Allah, you are burning with a severe fever."He said, "Yes, I suffer fever as two men among you would."I said, "Is that because you have a double reward?"He said, "Yes, that is so. No Muslim is afflicted by any harm, whether a thorn prick or worse, without Allah wiping away his sins on account of it, just as a tree sheds its leaves."

Bukhari 5648

Sahih

حدثنا عبدان عن أبي حمزة عن الأعمش عن إبراهيم التيمي عن الحارث بن سويد

عن عبد الله قال

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

البخاري 5648صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Sick
Chapter
Most severely tested of people are the prophets, then the next best, then the next best
Numbering
Darussalam 5648
Bukhari 5648