"We were with the Prophet ﷺ and the sun became eclipsed. He got up and went to the masjid, dragging his garment in haste. The people stood with him and he prayed two rak'ahs as they usually prayed. When the eclipse ended he addressed us and said 'The sun and the moon are two of the signs of Allah (SWT), with which He strikes fear into His slaves. They do not become eclipsed for the death or birth of anyone. If you see either of them being eclipsed, then pray and supplicate until it removed it from you.'" (Using translation from Nasāʾī 1502)
كُنَّا عِنْدَ النَّبِيِّ ﷺ فَانْكَسَفَتِ الشَّمْسُ فَقَامَ إِلَى الْمَسْجِدِ يَجُرُّ رِدَاءَهُ مِنَ الْعَجَلَةِ فَقَامَ إِلَيْهِ النَّاسُ فَصَلَّى رَكْعَتَيْنِ كَمَا تُصَلُّونَ فَلَمَّا انْجَلَتْ خَطَبَنَا فَقَالَ «إِنَّ الشَّمْسَ وَالْقَمَرَ آيَتَانِ مِنْ آيَاتِ اللهِ يُخَوِّفُ اللهُ بِهِمَا عِبَادَهُ وَإِنَّهُمَا لَا يَنْكَسِفَانِ لِمَوْتِ أَحَدٍ فَإِذَا رَأَيْتُمْ كُسُوفَ أَحَدِهِمَا فَصَلُّوا وَادْعُوا حَتَّى يُكْشَفَ مَا بِكُمْ»