Anas bin Malik reported,

The Prophet ﷺ passed by some people who were afflicted with trials and said, "Could these people not have asked Allah for well-being?"

Azami 10914

Sahih

عن أنس

أن النبي ﷺ مر بقوم مبتلين فقال: أما كان هولاء يسألون الله العافية.

الأعظمي 10914صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Supplications, remembrances, and prayer upon the chosen Prophet ﷺ
Chapter
Rulings on supplication
Section
Encouragement to ask for wellbeing
Numbering
Jami al-Kamil 10914 (2nd edition)
Azami 10914