Al-Kāfi

Hadith 820
oaths-vows
7- عَلِيٌّ عَنْ أَبِيهِ بِإِسْنَادِهِ عَنِ السَّكُونِيِّ عَنْ أَبِي عَبْدِ اللهِ (عَلَيْهِ السَّلام) قَالَ قَالَ رَسُولُ اللهِ (صَلَّى اللهُ عَلَيْهِ وَآلِه) مَنْ حَلَفَ سِرّاً فَلْيَسْتَثْنِ سِرّاً وَمَنْ حَلَفَ عَلانِيَةً فَلْيَسْتَثْنِ عَلانِيَةً.
7. Ali has narrated from his father from through the same chain of narrators as that of the previous Hadith the following is narrated from al-Sakuniy who has narrated the following: “Abu ‘Abd Allah (a.s.), has said that the Messenger of Allah, O Allah, grant compensation to Muhammad and his family worthy of their services to Your cause, has said, ‘If one takes an oath privately, he must make the exception privately; and if one takes an oath in public, he must make the exception in public.’”
Source: Shaykh Muḥammad b. Yaʿqūb al-Kulaynī