The sun was eclipsed, so the Prophet of Allah ﷺ prayed two rakats followed by another two rakats until it cleared. Then he said, "The sun and the moon do not eclipse for the death of anyone, but they are two of His creations. Allah brings about in His creation whatever He wills, and when Allah
manifests Himself to anything of His creation, it submits humbly before Him. So whichever of them is eclipsed, pray until it clears or until Allah brings about some new matter."
أخبرنا محمد بن المثنى قال حدثنا معاذ وهو ابن هشام قال حدثني أبي عن قتادة عن أبي قلابة
أن الشمس انخسفت فصلى نبي الله ﷺ ركعتين ركعتين حتى انجلت ثم قال إن الشمس والقمر لا ينخسفان لموت أحد ولكنهما خلقان من خلقه وإن الله عز وجل يحدث في خلقه ما شاء وإن الله عز وجل إذا تجلى لشيء من خلقه يخشع له فأيهما حدث فصلوا حتى ينجلي أو يحدث الله أمرا
[Its chain of transmission is daif] Ibn Khuzayma narrated it, no. 1402, from the hadith of Muaz bin Hisham Dastawai, transmitted through him, and it is in al-Kubra, no. 1872. Hakim graded it sahih according to the criteria of the two Shaikhs, 1/333, and Dhahabi agreed with him. See the previous hadith for its defect.