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 or birth of anyone, rather they are two of the signs of Allah (Subhanahu-wa-Taala), the Mighty and Sublime, so when you see that then pray.'"
أَخْبَرَنَا يَعْقُوبُ بْنُ إِبْرَاهِيمَ، قَالَ حَدَّثَنَا يَحْيَى، عَنْ إِسْمَاعِيلَ، قَالَ حَدَّثَنِي قَيْسٌ، عَنْ أَبِي مَسْعُودٍ، قَالَ قَالَ رَسُولُ اللَّهِ ﷺ " إِنَّ الشَّمْسَ وَالْقَمَرَ لاَ يَنْكَسِفَانِ لِمَوْتِ أَحَدٍ وَلَكِنَّهُمَا آيَتَانِ مِنْ آيَاتِ اللَّهِ عَزَّ وَجَلَّ فَإِذَا رَأَيْتُمُوهُمَا فَصَلُّوا " .