The Messenger of Allah ﷺ said, "They lead you in prayer. If they get it right, the reward is for you and for them, and if they err, the reward is still for you and the burden is upon them."
حدثنا حسن بن موسى حدثنا عبد الرحمن بن عبد الله بن دينار المديني عن زيد بن أسلم عن عطاء بن يسار
قال رسول الله ﷺ يصلون بكم فإن أصابوا فلكم ولهم وإن أخطئوا فلكم وعليهم
Its chain of transmission is sahih. Ata bin Yasar Hilali, the judge, freedman of Maymuna, narrated from his patroness, Abu Dharr, Zayd bin Thabit, and several others. Zayd bin Aslam, Sharik bin Abu Nimr, and many others narrated from him. He was among the senior Successors and their scholars, and he died in the year 103. Ibn Hibban mentioned him in Thiqat and said, "He came to Syria, where its people called him by the kunya Abu Abdullah, and he came to Egypt, where its people called him by the kunya Abu Yasar. He was a storyteller and a devoted worshipper."