al-Bukhari has reported from the Hadith of 'Aishah (RA):
(Allah's Messenger (ﷺ) said) "If anyone vows to disobey Allah, then he must not disobey Him." (IT)
Reference (IT): Bulugh al-Maram 1387 (IT)
In-book reference (IT): Book 13, Hadith 14 (IT)
English translation (IT): Book 13, Hadith 1387 (IT)