Abu Masud Uqba bin Amr reported,

The Messenger of Allah ﷺ said, "The sun and the moon are two of Allah's signs, by which Allah instills awe in His servants. They do not eclipse for the death of anyone. So when you see any of that, pray and call upon Allah until what has befallen you is removed."

Azami 8216

Sahih

عن أبي مسعود الأنصاري قال

قال رسول الله ﷺ: إن الشمس والقمر آيتان من آيات الله يخوف الله بهما عباده، وإنهما لا ينكسفان لموت أحد من الناس، فإذا رأيتم منها شيئا فصلوا وادعوا الله حتى يكشف ما بكم.

الأعظمي 8216صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Beginning of creation
Section
Sun and the moon are two signs among the signs of Allah, Allah created them for great wisdoms
Numbering
Jami al-Kamil 8216 (2nd edition)
Azami 8216