‘Abdallah b. Mas'ud reported God’s Messenger as saying, “No judge who pronounces judgment among men will fail to come on the day of resurrection with an angel holding the back of his neck. He* will then raise his head to heaven, and if God gives orders to cast him down, he will cast him into an abyss forty years deep."
Ahmad, Ibn Majah, and Baihaqi in Shu'ab al-lman transmitted it.
God's Messenger sent me to the Yemen as qadi and I said, “Messenger of God, are you sending me when I am young and have no knowledge of the duties of qadi He replied, “God will guide your heart and keep your tongue true. When two men bring a case before you do not decide in favour of the first till you hear what the other has to say, for it is best that you should have a clear idea of the best decision." He said he had no doubts about a decision afterwards.
‘A’isha reported God's Messenger as saying, “The day of resurrection will come to the just qadi and he will wish he had never given judgment between two men about a single date.”*
Ahmad transmitted it.
* He will wish he had never given judgment even about the most insignificant matters.
Mu'adh b. Jabal told that when God’s Messenger sent him to the Yemen he asked him how he would judge when the occasion arose, and he replied that he would judge in accordance with God’s Book. He asked what he would do if he could not find guidance in God’s Book, and he replied that he would act in accordance with God’s Messenger’s sunnah. He asked what he would do if he could find no guidance in God’s Messenger’s sunnah, and he replied that he would do his best to form an opinion and spare no pains. God’s Messenger then tapped him on the breast and said, “Praise be to God who has disposed His Messenger’s Messenger to something with which God’s Messenger is pleased!"