(3) باب اسْتِبَانَةِ الْخَطَإِ بَعْدَ الاِجْتِهَادِ
It was narrated that Ibn Umar said:
"While the people were in Quba praying Subh prayer, someone came to them and said that revelation had come to Messenger of Allah(ﷺ) the night before, and he had been commanded to face Ka'bah. So face toward it. They had been facing toward Ash-Sham, so they turned to face toward Ka'bah."
Reference: Sunan an-Nasa'i 745
In-book reference: Book 9, Hadith 4
English translation: Vol. 1, Book 9, Hadith 746