´Narrated Abu Hurairah:` "When the following was revealed: 'Whoever works evil will have the recompense of it... (4:123)' That worried the Muslims, so they complained about that to the Messenger of Allah (ﷺ) and he said: "Seek closeness and be steadfast, and in all that afflicts the believer there is atonement, even a thorn that pricks him, and the hardship he suffers."
Hadith Referenceسنن ترمذي / كتاب تفسير القرآن عن رسول الله صلى الله عليه وسلم / 3038
Hadith Gradingالألبانی:صحيح تخريج الطحاوية (390) ، الضعيفة تحت الحديث (2924)