The Messenger of Allah ﷺ said, "The sun and the moon are two of the signs of Allah . They do not eclipse for the death or life of anyone. So when you see them, pray until they become clear again."
أخبرنا محمد بن كامل المروزي عن هشيم عن يونس عن الحسن
قال رسول الله ﷺ إن الشمس والقمر آيتان من آيات الله عز وجل وإنهما لا ينكسفان لموت أحد ولا لحياته فإذا رأيتموهما فصلوا حتى تنجلي
Bukhari reported it in the Book of the Eclipse, chapter on the prayer during a solar eclipse, no. 1040, from the hadith of Yunus bin Ubayd, with this chain, and it is also in Kubra, no. 1846.