Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:16:91

And fulfill the covenant of Allah when you have taken it, ˹O believers˺, and do not break oaths after their confirmation while you have made Allah, over you, a witness. Indeed, Allah knows what you do.  

And fulfil God’s covenant, ˹effected˺ by way of pledges of allegiance and oaths and in other ways, when you made a covenant, and do not break ˹your˺ oaths after pledging them and having made God surety over you, that you will fulfill ˹the covenant˺, for you have sworn ˹the oath˺ by Him (the sentence wa-qad ja‘altumu’Llāha ‘alaykum kafīlan, ‘and having made God surety over you’, is a circumstantial qualifier). Truly God knows what you do — ˹this is˺ a threat for them.
القرآن:١٦:٩١

وَأَوْفُوا بِعَهْدِ اللَّهِ إِذَا عَاهَدْتُمْ وَلَا تَنْقُضُوا الْأَيْمَانَ بَعْدَ تَوْكِيدِهَا وَقَدْ جَعَلْتُمُ اللَّهَ عَلَيْكُمْ كَفِيلًا ۚ إِنَّ اللَّهَ يَعْلَمُ مَا تَفْعَلُونَ  

{وأوْفوا بعهد الله} من البيع والأيمان وغيرها {إذا عاهدتم ولا تنقضوا الأيمان بعد توكيدها} توثيقها {وقد جعلتم الله عليكم كفيلاً} بالوفاء حيث حلفتم به والجملة حال {إن الله يعلم ما تفعلون} تهديد لهم.