Abdullah bin Umar reported,

I do not know it except from the Prophet ﷺ, who said, "Whoever swears an oath and makes an exception has a choice. If he wishes, he may carry out his oath, and if he wishes, he may withdraw without breaking it," or he said, "without sin."

Ahmad 5093

Sahih

حدثنا إسماعيل حدثنا أيوب عن نافع

عن ابن عمر قال

لا أعلمه إلا عن النبي ﷺ قال من حلف فاستثنى فهو بالخيار إن شاء أن يمضي على يمينه وإن شاء أن يرجع غير حنث أو قال غير حرج

أحمد 5093صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abdullah bin Umar
Numbering
Darussalam 5093
Ahmad 5093