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.
quran:17:74

And if We had not strengthened you, you would have almost inclined to them a little.  

And if We had not made you ˹stand˺ firm, upon the Truth, by way of ˹divine˺ protection (‘isma), certainly you might have, you nearly, inclined to them a little, because of the extent of their deception and their persistence. This ˹statement˺ is explicit about the fact that the Prophet (s) neither inclined nor came close to doing so.
القرآن:١٧:٧٤

وَلَوْلَا أَنْ ثَبَّتْنَاكَ لَقَدْ كِدْتَ تَرْكَنُ إِلَيْهِمْ شَيْئًا قَلِيلًا  

{ولولا أن ثبتناك} على الحق بالعصمة {لقد كدت} قاربت {تركن} تميل {إليهم شيئا} ركونا {قليلاً} لشدة احتيالهم وإلحاحهم، وهو صريح في أنه ﷺ لم يركن ولا قارب.