The Prophet ﷺ said, "Whoever takes an oath and makes an exception, if he wishes he may carry it out, and if he wishes he may leave it without breaking the oath."
أخبرني أحمد بن سعيد قال حدثنا حبان قال حدثنا عبد الوارث قال حدثنا أيوب عن نافع
عن النبي ﷺ قال من حلف فاستثنى فإن شاء مضى وإن شاء ترك غير حنث
Grading, [Its chain is sahih]. Tirmidhi transmitted it in the chapters on Vows and Oaths, chapter on what has been said about making an exception in an oath, hadith 1531, from the hadith of Abdul-Warith bin Saeed, narrated with the same chain. It is also found in Al-Kubra, hadith 4735. Tirmidhi said, hasan, and Ibn Hibban graded it sahih.Ayub was followed by Kathir bin Farqad, as will come, hadith 3859.