The Messenger of Allah ﷺ said, "Whoever is turned back from his need by an evil omen has committed shirk."They asked, "Messenger of Allah, what is the expiation for that?"He replied, "Let one of them say, 'O Allah, there is no good except Your good, no omen except Your omen, and no god but You.'"
قال رسول الله ﷺ: مر ردته الطيرة من حاجة فقد أشرك. قالوا: يا رسول الله ما كفارة ذلك؟ قال: أن يقول أحدهم: اللهم لا خير إلا خيرك، ولا طير إلا طيرك، ولا إله غيرك.
Ahmad narrated it (7045) from Hasan (he is Ibn Musa Ashyab), who said, Ibn Lahia related to us, Ibn Hubayra informed us, from Abu Abdul-Rahman Hubli, from Abdullah bin Amr, who mentioned it. Ibn Sunni also narrated it in Amal al-Yawm wal-Layla (292) by way of Ibn Wahb, from Ibn Lahia, with the same account.This chain of transmission is hasan, for when Abdullah bin Wahb transmits from Abdullah bin Lahia, his hadith is hasan.As for what was narrated from Urwa bin Amir, who said, Bad omens were mentioned in the presence of the Prophet ﷺ, and he said, "The best of it is a good omen, and it should not turn away a Muslim. So when one of you sees something he dislikes, let him say, O Allah, none brings good things except You, and none repels bad things except You, and there is no strength and no power except through You," its chain of transmission is daif.Abu Dawud narrated it (3919), and this is his wording, as did Ibn Abu Shayba (26920) and Bayhaqi (8/139), all of them by various routes from Sufyan Thawri, from Habib bin Abu Thabit, from Urwa bin Amir, who mentioned it.It has two defects. The first is the disconnection between Habib bin Abu Thabit and Urwa bin Amir. Duri said in Tarikh (2815), I asked Yahya about the hadith of Habib bin Abu Thabit, from Urwa bin Amir. Yahya said, "It is mursal." End of quote (361). Ibn Hajar said in Tahdheeb (7/185), "It appears that Habib's narration from him is disconnected." End of quote.The second is that there is disagreement over whether Urwa bin Amir was a companion, and the correct view is that he was not a companion, as stated by Ibn Main, Ibn Qani, Ibn Asakir, Mizzi, and others.