The Prophet ﷺ said, "Whoever is granted a favor and acknowledges it has shown gratitude for it, and whoever conceals it has been ungrateful for it."
حدثنا عبد الله بن الجراح حدثنا جرير عن الأعمش عن أبي سفيان
عن النبي ﷺ قال من أبلي بلاء فذكره فقد شكره وإن كتمه فقد كفره
[Its isnad is daif]Abu Naeem narrated it in Akhbar Isbahan (1/259) from the hadith of Jareer, with this wording.Amash used an'ana (transmitted using "an" without an explicit statement of direct hearing), and it has a daif corroborating narration in Ibn Asakir.