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:2:225

Allah does not impose blame upon you for what is unintentional in your oaths, but He imposes blame upon you for what your hearts have earned. And Allah is Forgiving and Forbearing.  

God will not take you to task for a slip, that results, in your oaths, which is what the tongue utters spontaneously and unintentionally, such as ‘By God’, ‘Indeed, by God’: in such instances there is no sin and no redemption required; but He will take you to task for what your hearts have earned, what their intention is, when you commit perjury in your oaths; and God is Forgiving, of slips ˹in your oaths˺, Forbearing, since He delays the punishment of the one deserving it.
القرآن:٢:٢٢٥

لَا يُؤَاخِذُكُمُ اللَّهُ بِاللَّغْوِ فِي أَيْمَانِكُمْ وَلَٰكِنْ يُؤَاخِذُكُمْ بِمَا كَسَبَتْ قُلُوبُكُمْ ۗ وَاللَّهُ غَفُورٌ حَلِيمٌ  

{لا يؤاخذكم الله باللغو} الكائن {في أيمانكم} وهو ما يسبق إليه اللسان من غير قصد الحلف نحو ألا والله، وبلى و الله فلا إثم فيه ولا كفارة {ولكن يؤاخذكم بما كسبت قلوبكم} أي قصدته من الأيمان إذا حنثتم {والله غفور} لما كان من اللغو {حليم} بتأخير العقوبة عن مستحقها.