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:3:143

And you had certainly wished for martyrdom before you encountered it, and you have ˹now˺ seen it ˹before you˺ while you were looking on.  

You were longing for (tamannawna: one of the two letters tā’ has been omitted from the original ˹tatamannawna˺) death before you met it, when you said, ‘Would that we had a day like the Day of Badr in order to attain what its martyrs attained.’ Now you have seen it, that is, the cause of it, war, looking on, that is, with your eyes ˹open˺ and contemplating the conditions, so why did you retreat?
القرآن:٣:١٤٣

وَلَقَدْ كُنْتُمْ تَمَنَّوْنَ الْمَوْتَ مِنْ قَبْلِ أَنْ تَلْقَوْهُ فَقَدْ رَأَيْتُمُوهُ وَأَنْتُمْ تَنْظُرُونَ  

{ولقد كنتم تمنون} فيه حذف إحدى التاءين في الأصل {الموت من قبل أن تلقوه} حيث قلتم ليت لنا يوما كيوم بدر لننال ما نال شهداؤه {فقد رأيتموه} أي سببه الحرب {وأنتم تنظرون} أي بصراء تتأملون الحال كيف هي فلم انهزمتم؟ ونزل في هزيمتهم لما أشيع أن النبي قتل وقال لهم المنافقون إن كان قتل فارجعوا إلى دينكم.