The Messenger of Allah ﷺ stood up after stoning the man from Aslam and said, "Avoid this filth that Allah has forbidden. Whoever falls into any of it, let him conceal himself with the covering of Allah and repent to Allah, for whoever exposes his offense to us, we will carry out upon him the punishment prescribed in the Book of Allah ."
أن رسول الله ﷺ قام بعد أن رجم الأسلمي فقال: اجتنبوا هذه القاذورة التي نهى الله عنها، فمن ألم فليستتر بستر الله، وليتب إلى الله، فإنه من يبد لنا صفحة نقم عليه كتاب الله عز وجل.
No references are available.
Hakim (4/244) and Bayhaqi (8/330) both narrated it from the hadith of Yahya bin Saeed Ansari, who said, "Abdullah bin Dinar narrated to me, from Ibn Umar," and he mentioned it. Its isnad is sahih. Hakim said, "Sahih according to the criteria of the two Shaikhs."