Abdullah bin Masud reported,

The Messenger of Allah ﷺ prayed the noon prayer, then turned his face toward them. They said, "Has something new happened concerning the prayer?"He asked, "What is that?"They informed him of what he had done. So he folded his leg, faced the qiblah, and performed two prostrations, then gave the salam. Then he turned his face toward them and said, "I am only a human being. I forget as you forget. So when I forget, remind me." He added, "If something new had happened concerning the prayer, I would have informed you of it." And he said, "When one of you is uncertain in his prayer, let him seek out what is closest to being correct, then complete his prayer upon that, then perform two prostrations."

Nasai 1245

Sahih

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

عن عبد الله

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

النسائي 1245صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Forgetfulness
Chapter
Seeking the most correct direction
Numbering
Darussalam 1245
Nasai 1245