Qabisa bin Mukhariq reported,

The sun was eclipsed while we were with the Messenger of Allah ﷺ in Medina. He came out in alarm, dragging his garment, and prayed two long units of prayer. He finished just as the eclipse ended. He praised Allah and glorified Him, then said, "The sun and the moon are two of the signs of Allah. They are not eclipsed for the death or birth of anyone. So when you see anything of that, pray as you would the most recent obligatory prayer you have prayed."

Nasai 1487

Daif

و أخبرنا إبراهيم بن يعقوب قال حدثنا عمرو بن عاصم أن جده عبيد الله بن الوازع حدثه قال حدثنا أيوب السختياني عن أبي قلابة

عن قبيصة بن مخارق الهلالي قال

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

النسائي 1487ضعيف
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Eclipse
Chapter
Another type
Numbering
Darussalam 1487
Nasai 1487