Abdullah bin Umar reported,

He reported that the Prophet ﷺ saw some phlegm on the prayer wall of the mosque while he was leading the people in prayer, so he scraped it off. After finishing the prayer, he said, "When one of you is in prayer, Allah is before his face, so none of you should spit in front of himself during the prayer."This was narrated by Musa bin Uqba and Ibn Abu Rawwad from Nafi.

Bukhari 753

Sahih

حدثنا قتيبة بن سعيد قال حدثنا ليث عن نافع

عن ابن عمر

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

البخاري 753صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Adhan
Chapter
Whether one may turn around for something that happens to him or if he sees something or spittle on the qibla
Numbering
Darussalam 753
Bukhari 753