If God sent all these prophets and leaders how could any of them be in error?
Was God then in error for sending the wrong guy?
Damngrumpy, who said God sent the prophets in error?
They had been in the error of the idolatry, just like their peoples; and that was before sending them as apostles.
But
later, He guided them and sent them to people with His message.
God is All-Knowing and He knows best whom He chooses for the prophecy and apostle-hood.
So I gave you the example of Abraham who had been like his people: the Shia or devotees of Noah. Then God guided him and sent him to his people.
The second example is Mohammed, who came out of idolatrous people, then God guided him, to the 'exclusive devotion to God alone.'
BTW, the Mahdi, also was in the error of the enthusiasm about imams, then God guided him to know the 'exclusive devotion to God alone' and to warn his people.
And in a hadith or tradition:
The Mahdi: God reforms him in a night.
==============================================================
Abraham and his people:
Quran 21: 51-58, which mean
{
51. We gave to Abraham, aforetime, his right guidance a, and We were All-Knowing about him
b.
52. When he said to his father and his people: "What are such statues that you are cleaving
c to?"
53. They said: "We found our fathers worshipping them [and so we too worshipped them."
54. [Abraham] said: "Then obviously you and your fathers have been in manifest error [away from the truth.]
55. They said, "Are you telling us the truth, or are you kidding?"
56. [
Abraham] said: "No, but your Lord is the Lord of the heavens and the earth, Who split d them up [making them nine planets after being one earth], and I am one of those giving witness to it e."
57. And [Abraham swore secretly:] “By God! I have a plan against [you, to break up] your statues [: idols] f after you have gone away [to your festival], turning your backs [to the idols.]"
g
58. So he broke them into fragments, all but a big one among them h, that they might refer [their questions] to it. i}
................................................................
a It means: We showed him some of Our signs and might, in order to guide him to the truth, so that he would be firm in his belief, and then the words of the associaters would not make him waver.
b When he looked to the sky and the celestial objects, searching about his Creator, so We gave to him his right guidance and guided him to his purpose.
c i.e. constant in worshipping them.
d The meaning of the ‘splitting’ has been explained in the interpretation of the Quran 6: 14.
e i.e. one of those who saw His might and some of His signs, and so I have become certain that there is no god in the universe but He alone.
In this respect, He points out to His saying – be glorified – in the Quran 6: 75, which means:
(Thus did We show to Abraham [Our vast] kingdom of the heavens [: the planets] and the earth; so that he might be of those having sure belief.)
f He said this to himself secretly.
g So when they intended to go to the place of their playing and racing, they said: “Abraham, wouldn’t you come out with us?”
But he looked a glance at the stars [as they used to do.] Then said: "I am sick. So I cannot go with you."
So they left him and went away, and when he found an opportunity to break up their idols, he came to the statues carrying by his hand a dish with food, which he gave to them and said: "Would you eat [of this food]!?" But of course, the idols did not answer him, so he said: "What ails you that you are not speaking!?"
Then he took the axe and turned, beating the idols with [the axe by his] right hand.
h It means: except a big idol which he did not break up, and he hanged the axe on its neck.
i i.e. that haply they might refer to the big one and ask it, and because it does not speak, therefore, they will realize their ignorance for that they take it as a god.
Then when they returned from their feast, they found their idols broken up.
Quran 21: 59-65, which mean:
{
59. They said: "Who has done this to our gods? Surely he is one of the wrong-doers!"
60. They said [to each other]: "We heard a young man, called Abraham, mention them with evil."
61. They said: "Then bring him before the eyes of the people, that they may bear witness [against him and concerning his bad words about the idols. So they went to Abraham.]"
62. They said: " Is it you, O Abraham, who have done this to our gods?"
63. [Abraham] said: "No, but this one: their chief, has done it a. So question them [about the doer], if they can speak. b
64. So they turned to [blame] themselves and said [to each other]: "Surely, it is you who are the wrong-doers [because you worship these idols besides God.]"
65. Then they reverted to their old ideas [and to their disbelief c, and said:] "You know very well that these [idols] cannot speak d."}
..........................................................
a Out of rage, so that you should not worship these small ones, while it is bigger than they are.
b Therefore, Abraham ascribed the act to the big one, in order to let them realize that: if it does not agree about associating other idols with it, then how will God the Creator of all creatures agree about it?
c i.e. they changed their mind, and reverted to their doctrines and to their disbelief.
d Therefore, how do you order us to ask them?
Quran: 66-70, which mean:
66. [Abraham] said, "Do you then worship, besides God, that which can neither be of any good to you a, nor do you harm b ?”
67. "Fie upon you and that you serve instead of God, wouldn't you, then, understand c!?"
68. They said [to each other]: "Burn him [with fire] and defend your gods, if you should do [what we say to you.]" d
69. We said: "O fire, be coldness and [a means of] safety for Abraham." e
70. Then they sought to plot against him f, so We made them the greater losers g.
.......................................................
a whatever you may worship them.
b If you forsake their worship.
c And abandon worshipping the idols.
So when they heard such words from him …
d So they collected firewood for one month and burned fire with it, and threw Abraham in the fire with the catapult.
e So he came out of the fire three days later, safe and without being burned, and they were astonished of his safety.
f So as to kill him, and that was after his getting out of the fire.
g By terminating them with the plague, so they lost both the life of the World and the Next Life.
The interpretation is by Mohammed-Ali Hassan Al-Hilly.