The Book of Virtue, Enjoining Good Manners, and Joining of the Ties of Kinship
Ṣaḥīḥ Muslim 6563
لاَ تُصِيبُ الْمُؤْمِنَ شَوْكَةٌ فَمَا فَوْقَهَا إِلاَّ قَصَّ اللَّهُ بِهَا مِنْ خَطِيئَتِهِ
lā tuṣību al-muʾmina shawkatun famā fawqahā illā qaṣṣa-Llāh bihā min khaṭīʾatihi
Transliteration generated from the Arabic vowel marks
The full narration
A'isha reported Allah's Messenger (ﷺ) as saying:A believer does not undergo (the trouble) of running a thorn or more than that when Allah effaces his sins
Source
Ṣaḥīḥ Muslim · 6563
Ṣaḥīḥ