From Sahih Bukhari (Hadith 1048):
Narrated Abu Bakra:Allah's Messenger (ﷺ) said: "The sun and the moon are two signs amongst the signs of Allah and they do not eclipse because of the death of someone but Allah frightens His devotees with them
Reference: Bukhari 1048