'A'isha reported Allah's Messenger (ﷺ) as saying: 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.
Hadith Referenceصحيح مسلم / كتاب البر والصلة والآداب / 2572