Sahih al-Bukhari, Hadith 3951 ⓘ
Narrated Ka`b bin Malik: I never failed to join Allah's Messenger 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 Allah's Messenger 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).
حَدَّثَنِي يَحْيَى بْنُ بُكَيْرٍ، حَدَّثَنَا اللَّيْثُ، عَنْ عُقَيْلٍ، عَنِ ابْنِ شِهَابٍ، عَنْ عَبْدِ الرَّحْمَنِ بْنِ عَبْدِ اللَّهِ بْنِ كَعْبٍ، أَنَّ عَبْدَ اللَّهِ بْنَ كَعْبٍ، قَالَ سَمِعْتُ كَعْبَ بْنَ مَالِكٍ ـ رضى الله عنه ـ يَقُولُ لَمْ أَتَخَلَّفْ عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم فِي غَزْوَةٍ غَزَاهَا إِلاَّ فِي غَزْوَةِ تَبُوكَ، غَيْرَ أَنِّي تَخَلَّفْتُ عَنْ غَزْوَةِ بَدْرٍ، وَلَمْ يُعَاتَبْ أَحَدٌ تَخَلَّفَ عَنْهَا، إِنَّمَا خَرَجَ رَسُولُ اللَّهِ صلى الله عليه وسلم يُرِيدُ عِيرَ قُرَيْشٍ، حَتَّى جَمَعَ اللَّهُ بَيْنَهُمْ وَبَيْنَ عَدُوِّهِمْ عَلَى غَيْرِ مِيعَادٍ.
also referenced under: Book 64, Hadith 3 (In-Book) & Volume 5, Book 59, Hadith 287 (USC-MSA)