Abdul-Rahman bin Sahammasa reported,

Uqba bin Amir Juhani stood up when he should have remained seated. The people said, "Subhan Allah, Subhan Allah," but he did not sit down and continued standing. Toward the end of his prayer, he performed two prostrations while seated. After giving the salam, he said, "I heard you just now saying, 'Subhan Allah,' so that I would sit down, but what I did is the Sunnah."

Azami 2482

Sahih

عبد الرحمن بن شماسة المهري, يقول:

عن عقبة بن عامر الجهني قام، وعليه جلوس، فقال الناس: سبحان الله سبحان الله، فلم يجلس، ومضى على قيامه، فلما كان في آخر صلاته سجد سجدتين، وهو جالس، فلما سلم قال: إني سمعتكم آنفا تقولون: سبحان الله، لكيما أجلس، لكن السنة الذي صنعت.

الأعظمي 2482صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Forgetfulness
Section
One who stands from two rakahs, if he has straightened up he should continue, otherwise he should sit
Numbering
Jami al-Kamil 2482 (2nd edition)
Azami 2482