Abu Hurairah (May Allah be pleased with him) reported:
The Messenger of Allah ﷺ said, "Your leaders will lead you in Salat (prayer). If they conduct it properly, you and they will be rewarded; but if they make mistakes you will earn the reward and they will be held responsible (for the mistakes)."
وعنه أن رسول الله ﷺ قال:
"يصلون لكم، فإن أصابوا فلكم، وإن أخطؤوا فلكم وعليهم" ((رواه البخاري)).