It is narrated from Sayyiduna Sa’ib (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: Whatever hardship befalls a Muslim, even if a thorn pricks him, Allah Almighty writes a good deed for him or forgives a sin from him.
Hadith Referenceمسند احمد / مسند المدنيين رضي الله عنهم اجمعين / 16560
Hadith Gradingحکم دارالسلام:صحيح لغيره، وهذا إسناد ضعيف لضعف رشدين