Messenger of Allah ﷺ said: There is no trouble that comes to a believer except that it obliterates from his sins, even if it is the pricking of a thorn
أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ مَا مِنْ مُصِيبَةٍ يُصَابُ بِهَا الْمُسْلِمُ إِلاَّ كُفِّرَ بِهَا عَنْهُ حَتَّى الشَّوْكَةِ يُشَاكُهَا