It is reported that Shurayḥ – Allāh have mercy on him – said, “If I am afflicted with a calamity, I praise Allāh for it four times: I praise Him because it wasn’t worse than it was, I praise Him when He gives me the patience to bear it, I praise Him for enabling me to say al-istirjā’ (‘To Allāh we belong and to him we will return’; see Al-Baqarah: 154-156 ) in hope of a great reward, and I praise Him for not making it a calamity in my religion.”
Al-Dhahabī, Siyar A’lām Al-Nubalā`, in his biography of Shurayḥ Al-Qāḍī.