Abdullah bin Rabah al-Ansari wrote to me that Abdullah bin Amr said, "I went early to the Messenger of Allah ﷺ one day."He said, "He heard the voices of two men disputing over a verse, so the Messenger of Allah ﷺ came out to us with anger visible on his face and said, 'Those before you were destroyed only because of their disputes about the Scripture.'"
كتب إلي عبد الله بن رباح الأنصاري أن عبد الله بن عمرو قال: هجرت إلى رسول الله ﷺ يوما. قال: فسمع أصوات رجلين اختلفا في آية. فخرج علينا رسول الله ﷺ يعرف في وجهه الغضب فقال: إنما أهلك من كان قبلكم باختلافهم في الكتاب.
Muslim narrated it in the Book of Knowledge (2666) from Abu Kamil Fudayl bin Husayn Jahdari, who said, Hammad bin Zayd narrated to us, who said, Abu Imran Jawni narrated to us, and he related it. There are other hadiths with the same meaning mentioned in the Book of Knowledge.