"The sun eclipsed in the lifetime of Messenger of Allah ﷺ on the day when (his son) Ibrahim died. So the people said that the sun had eclipsed because of the death of Ibrahim. Messenger of Allah ﷺ said, "The sun and the moon do not eclipse because of the death or life (i.e. birth) of someone. When you see the eclipse pray and invoke Allah." (Using translation from Bukhārī 1043)
سَمِعْتُ الْمُغِيرَةَ بْنَ شُعْبَةَ يَقُولُ كَسَفَتِ الشَّمْسُ عَلَى عَهْدِ رَسُولِ اللهِ ﷺ يَوْمَ مَاتَ إِبْرَاهِيمُ فَقَالَ النَّاسُ كَسَفَتْ لِمَوْتِ إِبْرَاهِيمَ فَقَالَ رَسُولُ اللهِ ﷺ «الشَّمْسُ وَالْقَمَرُ آيَتَانِ مِنْ آيَاتِ اللهِ لَا يَنْكَسِفَانِ لِمَوْتِ أَحَدٍ وَلَا لِحَيَاتِهِ فَإِذَا رَأَيْتُمُوهُ فَادْعُوا اللهَ وَصَلُّوا حَتَّى يُكْشَفَ»