All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
The first Hadeeth is authentic and was narrated by At-Tirmithi which reads: “Indeed, Allaah Will not let my Ummah (or the Ummah of Muhammad, sallallaahu ‘alayhi wa sallam) agree on an error.” [Abu Daawood, Ibn Maajah, Ad-Daarimi, Ahmad in his Musnad, and other narrators (Al-Albaani: Saheeh; Shu‘ayb Al-Arnaa’oot: Saheeh by virtue of corroborating narrations)]
The second Hadeeth which reads: “Allaah Will never Make this Ummah agree on an error. The Hand of Allaah Is with the group; so, follow the greatest majority, for whoever goes astray, goes astray to Hell.” [Ahmad, Al-Bayhaqi, Abu Ya‘la, At-Tabaraani in Al-Kabeer and Al-Haakim in Al-Mustadrak]
Judging this Hadeeth’s chain of transmission, Ath-Thahabi said, “Had Khaalid had good memorization, we would have judged this Hadeeth as authentic.” Khaalid is ibn Yazeed one of the narrators of this Hadeeth. “The greatest majority” in this Hadeeth means the majority of scholars and Ahlus-Sunnah Wal-Jamaa‘ah.
The dispraised difference is that one which happens in terms of principles that leads to accusing others of dissoluteness or disbelief. However, difference in secondary issues which is based on valid reasoning is not dispraised and happens at all times and places even during the time of the Companions .
Allaah Knows best.