God Almighty said
O you who have believed, if a sinner comes to you with news, investigate, lest you harm a people out of ignorance and become as you have done to us.
A man came to the Commander of the Faithful Ali bin Abi Talib, may God be pleased with him, and told him something bad about another man. The Commander of the Faithful said to him, “We are asking about what you said. If you are truthful, we will take possession of you, and if you are a liar, we will punish you, and if you want us to protect you, we will take you away.” He said, “Keep me, O Commander of the Faithful.”
A man came to Omar bin Abdul Aziz, may God have mercy on him, and he mentioned something to him about a man. Omar said, “If you wish, we will look into your matter. If you are a liar, then you are among the people of this verse. If a sinner comes to you with news, and if you are truthful, then you are among the people of this verse, a gossiper.”
If you wish, we will pardon you. He said, “Pardon, O Commander of the Faithful, I will never return to it.”