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.
bukhari:3951Yaḥyá b. Bukayr > al-Layth > ʿUqayl > Ibn Shihāb > ʿAbd al-Raḥman b. ʿAbdullāh b. Kaʿb > ʿAbdullāh b. Kaʿb > Kaʿb b. Mālik > Lam Atakhallaf

I never failed to join Messenger of Allah ﷺ in any of his Ghazawat except in the Ghazwa of Tabuk. However, I did not take part in the Ghazwa of Badr, but none who failed to take part in it, was blamed, for Messenger of Allah ﷺ had gone out to meet the caravans of (Quraish, but Allah caused them (i.e. Muslims) to meet their enemy unexpectedly (with no previous intention) .  

البخاري:٣٩٥١حَدَّثَنِي يَحْيَى بْنُ بُكَيْرٍ حَدَّثَنَا اللَّيْثُ عَنْ عُقَيْلٍ عَنِ ابْنِ شِهَابٍ عَنْ عَبْدِ الرَّحْمَنِ بْنِ عَبْدِ اللَّهِ بْنِ كَعْبٍ أَنَّ عَبْدَ اللَّهِ بْنَ كَعْبٍ قَالَ سَمِعْتُ كَعْبَ بْنَ مَالِكٍ ؓ يَقُولُ لَمْ أَتَخَلَّفْ

عَنْ رَسُولِ اللَّهِ ﷺ فِي غَزْوَةٍ غَزَاهَا إِلاَّ فِي غَزْوَةِ تَبُوكَ غَيْرَ أَنِّي تَخَلَّفْتُ عَنْ غَزْوَةِ بَدْرٍ وَلَمْ يُعَاتَبْ أَحَدٌ تَخَلَّفَ عَنْهَا إِنَّمَا خَرَجَ رَسُولُ اللَّهِ ﷺ يُرِيدُ عِيرَ قُرَيْشٍ حَتَّى جَمَعَ اللَّهُ بَيْنَهُمْ وَبَيْنَ عَدُوِّهِمْ عَلَى غَيْرِ مِيعَادٍ