The Messenger of Allah ﷺ said, "Nothing befalls a believer, even a thorn that pricks him, without Allah recording for him a good deed because of it and erasing from him a sin because of it."
قال حدثنا يحيى بن غيلان قال حدثنا رشدين قال حدثني يزيد بن عبد الله يعني ابن الهاد عن أبي بكر بن المنكدر عن عطاء بن يسار
عن رسول الله ﷺ أنه قال ما من شيء يصيب المؤمن حتى الشوكة تصيبه إلا كتب الله له بها حسنة وحط عنه بها خطيئة
Its isnad is hasan, because of Rushdin bin Saad. The hadith of Rushdin is only graded hasan because it has a corroborating narration and supporting witnesses, and the hadith preceded at .