"Allah will not punish you for what is unintentional in your oaths, but He will punish you for your deliberate oaths ..." Sahih al-Bukhari 6626

Arabic hadith text
حَدَّثَنِي إِسْحَاقُ يَعْنِي ابْنَ إِبْرَاهِيمَ، حَدَّثَنَا يَحْيَى بْنُ صَالِحٍ، حَدَّثَنَا مُعَاوِيَةُ، عَنْ يَحْيَى، عَنْ عِكْرِمَةَ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏مَنِ اسْتَلَجَّ فِي أَهْلِهِ بِيَمِينٍ فَهْوَ أَعْظَمُ إِثْمًا، لِيَبَرَّ ‏"‏‏.‏ يَعْنِي الْكَفَّارَةَ‏.‏
Translation
Narrated Abu Huraira

Allah's Messenger (ﷺ) said, "Anyone who takes an oath through which his family may be harmed, and insists on keeping it, he surely commits a sin greater (than that of dissolving his oath). He should rather compensate for that oath by making expiation."