Anas bin Malik reported,

Hakim reported that the Messenger of Allah ﷺ said, "There is no servant whom Allah عز وجل tests with an affliction in his body except that Allah عز وجل says to the angel, 'Record for him the righteous deeds he used to perform.' If Allah heals him, He washes him and purifies him, and if He takes his soul, He forgives him and shows him mercy."

Ahmad 13501

Difficult

حدثنا حسن حدثنا حماد بن سلمة عن أبي ربيعة

عن أنس بن مال

ك أن رسول الله ﷺ قال ما من عبد يبتليه الله عز وجل ببلاء في جسده إلا قال الله عز وجل للملك اكتب له صالح عمله الذي كان يعمله فإن شفاه الله غسله وطهره وإن قبضه غفر له ورحمه

أحمد 13501مشكل
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Anas bin Malik
Numbering
Darussalam 13501
Ahmad 13501