The Messenger of Allah (may peace be upon him) said:
"No Muslim is afflicted by a harm,
be it the pricking of a thorn or something more
(painful than that), but Allah thereby causes his sins to fall away
just as a tree sheds its leaves."
(Reported by Al - Bukhari and Muslim)