Abdullah bin Masud reported,

The Messenger of Allah ﷺ prayed ﷺ. Ibrahim said, either adding or omitting. When he had given the closing salaam, someone said to him, "Messenger of Allah, has something new been introduced into the prayer?"He asked, "What do you mean?"They said, "You prayed such and such."So he folded his legs back, faced the qibla, made two prostrations, then gave the salaam. Then he turned his face toward us and said, "If anything new had been introduced into the prayer, I would have informed you of it. But I am only a human being. I forget just as you forget. So when I forget, remind me. And if any of you is uncertain about his prayer, let him seek out what is correct, complete the prayer upon that, and then make two prostrations."Mansur's version reads, "Let him consider which of the alternatives is closer to being correct."

Muslim 1276

Sahih

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

مسلم 1276صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Mosques and places of prayer
Chapter
Forgetfulness in prayer and sujud for it
Numbering
Darussalam 1276
Muslim 1276