ENOfficial
'A'isha reported: I heard Allah's Messenger (ﷺ) as saying: There is nothing (in the form of trouble) that comes to a believer even if it is the pricking of a thorn that there is decreed for him by Allah good or his sins are obliterated.
Source: sunnah.com
Other translations
Arabic
حَدَّثَنِي حَرْمَلَةُ بْنُ يَحْيَى، أَخْبَرَنَا عَبْدُ اللَّهِ بْنُ وَهْبٍ، أَخْبَرَنَا حَيْوَةُ، حَدَّثَنَا ابْنُ الْهَادِ، عَنْ أَبِي بَكْرِ بْنِ حَزْمٍ، عَنْ عَمْرَةَ، عَنْ عَائِشَةَ، قَالَتْ سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ " مَا مِنْ شَىْءٍ يُصِيبُ الْمُؤْمِنَ حَتَّى الشَّوْكَةِ تُصِيبُهُ إِلاَّ كَتَبَ اللَّهُ لَهُ بِهَا حَسَنَةً أَوْ حُطَّتْ عَنْهُ بِهَا خَطِيئَةٌ " .
sunnah.com