Abu Musa reported the Prophet as saying, “No affliction great or small afflicts a man but for a sin, but there are more which God forgives.” Then he recited, “Whatever misfortune befalls you, it is because of what your hands have done; but He forgives much.”(Qur’an, xlii, 30)
Tirmidhi transmitted it.