The 39th of the 42 hadiths gathered by Imam Yahya ibn Sharaf an-Nawawi in An-Nawawi's Forty Hadith, given below in the original Arabic with an English translation and its reference.
عَنْ ابْنِ عَبَّاسٍ رَضِيَ اللَّهُ عَنْهُمَا أَنَّ رَسُولَ اللَّهِ صلى الله عليه و سلم قَالَ: "إنَّ اللَّهَ تَجَاوَزَ لِي عَنْ أُمَّتِي الْخَطَأَ وَالنِّسْيَانَ وَمَا اسْتُكْرِهُوا عَلَيْهِ" . حَدِيثٌ حَسَنٌ، رَوَاهُ ابْنُ مَاجَهْ [رقم:2045]، وَالْبَيْهَقِيّ ["السنن]
On the authority of Ibn Abbas (may Allah be pleased with him), that the Messenger of Allah (peace and blessings of Allah be upon him) said: Verily Allah has pardoned [or been lenient with] for me my ummah: their mistakes, their forgetfulness, and that which they have been forced to do under duress. A hasan hadeeth related by Ibn Majah, and al-Bayhaqee and others
Sunni collections: text from the open hadith-api dataset. Al-Kafi: Arabic text, Muhammad Sarwar's translation and gradings from Thaqalayn.net via the Thaqalayn API. Hadith numbering follows those editions and can differ from a printed copy — check the Arabic against a trusted edition before relying on a reference.