Abu Hurairah reported,

The Messenger of Allah ﷺ stood in prayer, and we stood with him. An Arabi said while in the prayer, "Allah, have mercy on me and on Muhammad, and do not grant mercy along with us to anyone else."When the Prophet ﷺ concluded the prayer, he said to the Arabi, "You have restricted something vast," meaning the mercy of Allah.

Azami 10916

Sahih

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

قام رسول الله ﷺ في صلاة، وقمنا معه، فقال أعرابي وهو في الصلاة: اللهم ارحمني ومحمدا، ولا ترحم معنا أحدا فلما سلم النبي ﷺ قال للأعرابي: لقد حجرت واسعا يريد رحمة الله.

الأعظمي 10916صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Supplications, remembrances, and prayer upon the chosen Prophet ﷺ
Chapter
Rulings on supplication
Section
Disliking that the supplicant limits the Wasi mercy of his Lord in his supplication
Numbering
Jami al-Kamil 10916 (2nd edition)
Azami 10916