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:38:14

Each of them denied the messengers, so My penalty was justified.  

Each one, of the factions, did not but deny the messengers, for when they deny one, they have ˹in effect˺ denied them all, since their call ˹to God˺ is ˹the same˺ one, namely, the call to ˹affirmation of˺ His Oneness. So My retribution was justified, ˹it was˺ necessary.
القرآن:٣٨:١٤

إِنْ كُلٌّ إِلَّا كَذَّبَ الرُّسُلَ فَحَقَّ عِقَابِ  

{إن} ما {كل} من الأحزاب {إلا كذب الرسل} لأنهم إذا كذبوا واحدا منهم فقد كذبوا جميعهم لأن دعوتهم واحدة، وهي دعوة التوحيد {فحق} وجب {عقاب}.