It was narrated that Abu Mas’ud said:The Messenger of Allah (ﷺ) said: “The sun and the moon do not become eclipsed for the death of anyone among mankind. If you see that, then stand and perform prayer.”
حَدَّثَنَا مُحَمَّدُ بْنُ عَبْدِ اللَّهِ بْنِ نُمَيْرٍ، حَدَّثَنَا أَبِي، حَدَّثَنَا إِسْمَاعِيلُ بْنُ أَبِي خَالِدٍ، عَنْ قَيْسِ بْنِ أَبِي حَازِمٍ، عَنْ أَبِي مَسْعُودٍ، قَالَ قَالَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ " إِنَّ الشَّمْسَ وَالْقَمَرَ لاَ يَنْكَسِفَانِ لِمَوْتِ أَحَدٍ مِنَ النَّاسِ. فَإِذَا رَأَيْتُمُوهُ فَقُومُوا فَصَلُّوا " .
IbnMaja
Establishing the Prayer and the Sunnah Regarding Them • Hadith 1261