Alqama reported,

Abdullah reported that the Messenger of Allah ﷺ prayed. Ibrahim said, he either added or omitted something. When he gave the salam, it was said to him, "Messenger of Allah, has something new occurred in the prayer?"He asked, "What is that?"They replied, "You prayed such and such."So he turned his legs, faced the qiblah, performed two prostrations, then gave the salam. Then he turned his face toward us and said, "If something new had occurred in 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 when one of you is uncertain about his prayer, let him seek what is correct, complete his prayer accordingly, then perform two prostrations."

Muslim 1274

Sahih

و حدثنا عثمان وأبو بكر ابنا أبي شيبة وإسحق بن إبراهيم جميعا عن جرير قال عثمان حدثنا جرير عن منصور عن إبراهيم

عن علقمة قال

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

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