Surah Sad 38:14
إِن كُلٌّ إِلَّا كَذَّبَ ٱلرُّسُلَ فَحَقَّ عِقَابِ
Each of them denied the messengers, so My penalty was justified.
Translation: Saheeh International
Tafsir
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.
Excerpt from Tafsir al-Jalalayn, commentary on 38:14, via Quran.com. The reader has the full commentary and 9 more tafsirs.