Abu Bakra reported,

The sun was eclipsed during the time of the Messenger of Allah ﷺ, so he went out dragging his cloak until he reached the mosque. The people gathered around him, and he led them in two units of prayer. The sun then became clear, and he said, "The sun and the moon are two of Allah's signs. They do not eclipse for the death of anyone. When that happens, pray and supplicate until what afflicts you is removed."This was because a son of the Prophet ﷺ named Ibrahim had died, and the people had spoken about that.

Bukhari 1063

Sahih

حدثنا أبو معمر قال حدثنا عبد الوارث قال حدثنا يونس عن الحسن

عن أبي بكرة قال

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

البخاري 1063صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Eclipse
Chapter
Prayer during a lunar eclipse
Numbering
Darussalam 1063
Bukhari 1063