Musa (alayhis-salaam) advised them with a great affair!
Allaah (The Most High) said:
وَقَالَ مُوسَىٰ يَا قَوْمِ إِن كُنتُمْ آمَنتُم بِاللَّهِ فَعَلَيْهِ تَوَكَّلُوا إِن كُنتُم مُّسْلِمِينَ
فَقَالُوا عَلَى اللَّهِ تَوَكَّلْنَا رَبَّنَا لَا تَجْعَلْنَا فِتْنَةً لِّلْقَوْمِ الظَّالِمِينَ
وَنَجِّنَا بِرَحْمَتِكَ مِنَ الْقَوْمِ الْكَافِرِينَ
And Musa (Moses) said: “O my people! If you have believed in Allah, then put your trust in Him if you are Muslims (those who submit to Allah’s Will).” They said: “In Allah we put our trust. Our Lord! Make us not a trial for the folk who are Zalimun (polytheists and wrong-doing) (i.e. do not make them overpower us). And save us by Your Mercy from the disbelieving folk.” [10:84-86]
Reminders from Imaam Sadi (rahimahullaah)
They asked their Lord not to put them to trial-neither by way of being placed under the authority of a people who would then put them to trial, nor to be defeated and then they fall into trial, saying: Had we been upon the truth we would not have been defeated.
Abridged and paraphrased. See Tayseer Al-Kareem Ar-Rahmaan Fee Tafseer kalaam al-Mannaan of Imaam Sadi (rahimahullaah)