Abu Musa Ashari reported,

The sun was eclipsed during the time of the Prophet ﷺ, so he rose in alarm, fearing that the Hour had come, until he reached the mosque. He stood in prayer with the longest standing, bowing, and prostration I had ever seen him perform in any prayer.Then he said, "These signs which Allah sends do not occur for the death or life of anyone, but Allah sends them to instill fear in His servants. So when you see any of them, hasten to His remembrance, supplication, and seeking His forgiveness."In the narration of Ibn Ala, the wording is "the sun was eclipsed," and he said, "to instill fear in His servants."

Muslim 2117

Sahih

حدثنا أبو عامر الأشعري عبد الله بن براد ومحمد بن العلاء قالا حدثنا أبو أسامة عن بريد عن أبي بردة

عن أبي موسى قال

خسفت الشمس في زمن النبي ﷺ فقام فزعا يخشى أن تكون الساعة حتى أتى المسجد فقام يصلي بأطول قيام وركوع وسجود ما رأيته يفعله في صلاة قط ثم قال إن هذه الآيات التي يرسل الله لا تكون لموت أحد ولا لحياته ولكن الله يرسلها يخوف بها عباده فإذا رأيتم منها شيئا فافزعوا إلى ذكره ودعائه واستغفاره وفي رواية ابن العلاء كسفت الشمس وقال يخوف عباده

مسلم 2117صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Eclipse
Chapter
Call for the eclipse prayer, "The prayer is congregating"
Numbering
Darussalam 2117
Muslim 2117