A believer does not receive (the trouble) of running a thorn or more than that but Allah elevates him in rank or effaces his sins because of that. (Using translation from Muslim 2572b)
قَالَ رَسُولُ اللهِ ﷺ مَا يُصِيبُ الْمُؤْمِنَ مِنْ شَوْكَةٍ فَمَا فَوْقَهَا إِلَّا رَفَعَهُ اللهُ بِهَا دَرَجَةً وَحَطَّ عَنْهُ بِهَا خَطِيئَةً