Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:4062[Chain 1] Abū ʿAbdullāh al-Ḥāfiẓ > Abū Bakr Aḥmad b. Jaʿfar > ʿAbdullāh b. Aḥmad from my father > Ḥasan b. Mūsá [Chain 2] Abū Bakr al-Ismāʿīlī > Abū Yaʿlá > Abū Khaythamah > al-Ḥasan b. Mūsá > ʿAbd al-Raḥman b. ʿAbdullāh b. Dīnār al-Madanī > Zayd b. Aslam > ʿAṭāʾ b. Yasār > Abū Hurayrah ؓ

[Machine] The Messenger of Allah ﷺ said, "They (the scholars) pray for you. If they are correct, it is for you and for them, and if they are mistaken, it is on you and on them, except for the statement of Abu Khaythamah who did not mention Ibn Dinar, and Abdur Rahman ibn Abdullah al-Madani said..."  

البيهقي:٤٠٦٢أنبأ أَبُو عَبْدِ اللهِ الْحَافِظُ أنبأ أَبُو بَكْرٍ أَحْمَدُ بْنُ جَعْفَرٍ ثنا عَبْدُ اللهِ بْنُ أَحْمَدَ حَدَّثَنِي أَبِي ثنا حَسَنُ بْنُ مُوسَى ح وَأنبأ أَبُو عَمْرٍو الْأَدِيبُ أنبأ أَبُو بَكْرٍ الْإِسْمَاعِيلِيُّ أَخْبَرَنِي أَبُو يَعْلَى ثنا أَبُو خَيْثَمَةَ ثنا الْحَسَنُ بْنُ مُوسَى ثنا عَبْدُ الرَّحْمَنِ بْنُ عَبْدِ اللهِ بْنِ دِينَارٍ الْمَدَنِيُّ عَنْ زَيْدِ بْنِ أَسْلَمَ عَنْ عَطَاءِ بْنِ يَسَارٍ عَنْ أَبِي هُرَيْرَةَ ؓ قَالَ

قَالَ رَسُولُ اللهِ ﷺ يُصَلُّونَ لَكُمْ فَإِنْ أَصَابُوا فَلَكُمْ وَلَهُمْ وَإِنْ أَخْطَئُوا فَلَكُمْ وَعَلَيْهِمْ لَفْظُ حَدِيثِهِمَا سَوَاءٌ إِلَّا أَنَّ أَبَا خَيْثَمَةَ لَمْ يَذْكُرِ ابْنَ دِينَارٍ وَقَالَ عَبْدُ الرَّحْمَنِ بْنُ عَبْدِ اللهِ الْمَدَنِيُّ  

رَوَاهُ الْبُخَارِيُّ فِي الصَّحِيحِ عَنِ الْفَضْلِ بْنِ سَهْلٍ عَنِ الْحَسَنِ بْنِ مُوسَى الْأَشْيَبِ

See similar narrations below:

Collected by Bayhaqī
bayhaqi:5330Abū ʿAbdullāh al-Ḥāfiẓ > Abū Bakr Aḥmad b. Jaʿfar > ʿAbdullāh b. Aḥmad b. Ḥanbal from my father > al-Ḥasan b. Mūsá > ʿAbd al-Raḥman b. ʿAbdullāh b. Dīnār > Zayd b. Aslam > ʿAṭāʾ b. Yasār > Abū Hurayrah

[Machine] The Messenger of Allah ﷺ said, "They pray for you, so if they are correct, it is for your benefit and theirs, but if they make a mistake, it is for your benefit and on them."  

البيهقي:٥٣٣٠أَخْبَرَنَا أَبُو عَبْدِ اللهِ الْحَافِظُ أنبأ أَبُو بَكْرٍ أَحْمَدُ بْنُ جَعْفَرٍ ثنا عَبْدُ اللهِ بْنُ أَحْمَدَ بْنِ حَنْبَلٍ حَدَّثَنِي أَبِي ثنا الْحَسَنُ بْنُ مُوسَى ثنا عَبْدُ الرَّحْمَنِ بْنُ عَبْدِ اللهِ بْنِ دِينَارٍ عَنْ زَيْدِ بْنِ أَسْلَمَ عَنْ عَطَاءِ بْنِ يَسَارٍ عَنْ أَبِي هُرَيْرَةَ قَالَ

قَالَ رَسُولُ اللهِ ﷺ يُصَلُّونَ لَكُمْ فَإِنْ أَصَابُوا فَلَكُمْ وَلَهُمْ وَإِنْ أَخْطَئُوا فَلَكُمْ وَعَلَيْهِمْ  

رَوَاهُ الْبُخَارِيُّ فِي الصَّحِيحِ عَنِ الْفَضْلِ بْنِ سَهْلٍ عَنْ حَسَنِ بْنِ مُوسَى