Belief in the Divine Decree - Section 3 Mishkat al-Masabih 124

Arabic hadith text
وَعَن أم سَلمَة يَا رَسُول الله لَا يزَال يصيبك كُلِّ عَامٍ وَجَعٌ مِنَ الشَّاةِ الْمَسْمُومَةِ الَّتِي أَكَلْتَ قَالَ: «مَا أَصَابَنِي شَيْءٌ مِنْهَا إِلَّا وَهُوَ مَكْتُوبٌ عَلَيَّ وَآدَمُ فِي طِينَتِهِ» . رَوَاهُ ابْنُ مَاجَهْ
Translation

Umm Salama said, “Messenger of God, you continue to be afflicted annually with pain from the poisoned sheep you ate.” He replied, “I am afflicted by nothing due to it which was not decreed for me while Adam was still a lump of clay.” Ibn Majah transmitted it.