Anas bin Malik reported,

The people questioned the Prophet ﷺ persistently until they wearied him with their questions. So one day, the Prophet ﷺ ascended the pulpit and said, "Ask me about anything, and I will explain it to you."I began looking right and left, and there was every man with his head in his garment, weeping. Then a man stood up who, whenever he was quarreled with, would be accused of belonging to someone other than his father. He said, "Prophet of Allah, who is my father?"He replied, "Your father is Hudhafa."Then Umar stood up and said, "We are pleased with Allah as our Lord, with Islam as our religion, and with Muhammad as our Messenger. We seek refuge in Allah from the evil of trials."The Prophet ﷺ said, "I have never seen good and evil as I have seen today. Paradise and Hell were depicted for me, until I saw them both before the wall."Qatada used to mention this hadith in connection with this verse, "You who believe, do not ask about things which, if made clear to you, would distress you. But if you ask about them while the Quran is being revealed, they will be made clear to you. Allah has pardoned that which is past, and Allah is Forgiving and Forbearing" [Maidah 5:101].

Azami 15709

Sahih

عن أنس بن مالك قال

سألوا النبي ﷺ حتى أحفوه بالمسألة، فصعد النبي ﷺ ذات يوم المنبر فقال: لا تسألوني عن شيء إلا بينت لكم فجعلت أنظر يمينا وشمالا، فإذا كل رجل رأسه في ثوبه يبكي، فأنشأ رجل، كان إذا لاحي يدعي إلى غير أبيه، فقال: يا نبي الله من أبي؟ فقال: أبوك حذافة ثم أنشأ عمر فقال: رضينا بالله ربا، وبالإسلام دينا، وبمحمد رسولا، نعوذ بالله من سوء الفتن. فقال النبي ﷺ: ما رأيت في الخير والشر كاليوم قط، إنه صورت لي الجنة والنار حتى رأيتهما دون الحائط فكان قتادة يذكر هذا الحديث عند هذه الآية: {يا أيها الذين آمنوا لا تسألوا عن أشياء إن تبد لكم تسؤكم وإن تسألوا عنها حين ينزل القرآن تبد لكم عفا الله عنها والله غفور حليم} [المائدة: ١٠١].

الأعظمي 15709صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Tribulations and signs of the Hour
Chapter
Tribulations
Section
Seeking refuge from trials
Numbering
Jami al-Kamil 15709 (2nd edition)