The sun was eclipsed during the time of the Messenger of Allah ﷺ. He hurried out, dragging his garment in alarm, until he reached the mosque. He kept leading us in prayer until the eclipse cleared.When it cleared, he said, "Some people claim that the sun and the moon are eclipsed only for the death of one of the great. That is not so. The sun and the moon are not eclipsed for anyone's death or birth, but they are two signs among the signs of Allah . When Allah
manifests Himself to anything of His creation, it humbles itself before Him. So when you see that, pray as you would pray the most recent obligatory prayer you have performed."
أخبرنا محمد بن بشار قال حدثنا عبد الوهاب قال حدثنا خالد عن أبي قلابة
انكسفت الشمس على عهد رسول الله ﷺ فخرج يجر ثوبه فزعا حتى أتى المسجد فلم يزل يصلي بنا حتى انجلت فلما انجلت قال إن ناسا يزعمون أن الشمس والقمر لا ينكسفان إلا لموت عظيم من العظماء وليس كذلك إن الشمس والقمر لا ينكسفان لموت أحد ولا لحياته ولكنهما آيتان من آيات الله عز وجل إن الله عز وجل إذا بدا لشيء من خلقه خشع له فإذا رأيتم ذلك فصلوا كأحدث صلاة صليتموها من المكتوبة
[Its chain is daif] Ibn Majah narrated it in the Book of Establishing Prayers, chapter on what has been said about the prayer of eclipse, hadith no. 1262, from the hadith of Abdul-Wahhab Thaqafi, and it is also in Al-Kubra, hadith no. 1870. Bayhaqi said, 3/333, "This is mursal. Abu Qilaba did not hear it from Numan bin Bashir, rather he narrated it from a man, from Numan." So the chain is daif because of the anonymity of the man.