Jabir bin Abdullah reported,

The sun was eclipsed during the time of the Messenger of Allah ﷺ on an extremely hot day. The Messenger of Allah ﷺ led his companions in prayer, prolonging the standing until they began to collapse. Then he bowed and prolonged the bowing, then he rose and prolonged the standing, then he bowed and prolonged the bowing, then he rose and prolonged the standing, then he made two prostrations. Then he stood up and did much the same again, stepping forward at one point and stepping backward at another. So it amounted to four bowings and four prostrations.People used to say that the sun and the moon are eclipsed only for the death of one of their great ones. But these two are signs among the signs of Allah which He shows to you, so when an eclipse occurs, pray until it clears.

Nasai 1479

Sahih

أخبرنا أبو داود قال حدثنا أبو علي الحنفي قال حدثنا هشام صاحب الدستوائي عن أبي الزبير

عن جابر بن عبد الله قال

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

النسائي 1479صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Eclipse
Chapter
Another type
Numbering
Darussalam 1479
Nasai 1479