Jami` at-Tirmidhi, Book 20, Hadith 9 (Tirmidhi 1566)

Narrated Ibn 'Umar:

That the Messenger of Allah (ﷺ) said: "Whoever swears about an oath and says: 'If Allah wills (Insha Allah), then there is no breaking of the oath against him."