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:12:66

˹Jacob˺ said, "Never will I send him with you until you give me a promise by Allah that you will bring him ˹back˺ to me, unless you should be surrounded by enemies." And when they had given their promise, he said, "Allah, over what we say, is Witness."  

He said, ‘I will not send him with you until you give me a ˹solemn˺ pledge, a covenant, in the name of God, by your swearing an oath, that assuredly you will bring him back to me, unless you are besieged’, such that you die, or are overwhelmed and thus unable to bring him back. They agreed to this. And when they gave him their ˹solemn˺ pledge, to this effect, he said, ‘God shall be Guardian, Witness, over what we say’, we and you. Thus he sent him with them.
القرآن:١٢:٦٦

قَالَ لَنْ أُرْسِلَهُ مَعَكُمْ حَتَّىٰ تُؤْتُونِ مَوْثِقًا مِنَ اللَّهِ لَتَأْتُنَّنِي بِهِ إِلَّا أَنْ يُحَاطَ بِكُمْ ۖ فَلَمَّا آتَوْهُ مَوْثِقَهُمْ قَالَ اللَّهُ عَلَىٰ مَا نَقُولُ وَكِيلٌ  

{قال لن أرسله معكم حتى تؤتون موثقا} عهدا {من الله} بأن تحلفوا {لتأتنني به إلا أن يحاط بكم} بأن تموتوا أو تغلبوا فلا تطيقوا الإتيان به فأجابوه إلى ذلك {فلما آتوه موثقهم} بذلك {قال الله على ما نقول} نحن وأنتم {وكيل} شهيد وأرسله معهم.