Abdullah bin Masud reported,

I came to the Prophet ﷺ during his illness while he was suffering from a severe fever, and I said, "You are suffering from a very severe fever."I said, "That is because you have a double reward."He replied, "Yes. No Muslim is afflicted with any harm except that Allah causes his sins to fall away from him as the leaves fall from a tree."

Azami 9326

Sahih

عن عبد الله بن مسعود قال

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

الأعظمي 9326صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Biography of the Prophet ﷺ
Chapter
Nearness of his death, his foretelling of it, his passing, and his burial
Section
Illness of the Messenger of Allah ﷺ
Numbering
Jami al-Kamil 9326 (2nd edition)
Azami 9326