´Abu Hurairah narrated that the Messenger of Allah (ﷺ) said:` "When the judge passes a judgement in which he strived and was correct, then he receives two rewards. And when he judges and is mistaken, then he receives one reward."
Hadith Referenceسنن ترمذي / كتاب الأحكام عن رسول الله صلى الله عليه وسلم / 1326
´It was narrated that Abu Hurairah said:` "The Messenger of Allah [SAW] said: 'If a judge passes judgment and strives to reach the right conclusion and gets it right, he will have two rewards; if he strives to reach the right conclusion but gets it wrong, he will still have one reward."
Hafiz Muhammad Ameen
English translation:
Man has control only over making an effort. If he strives, he certainly receives the reward for his effort, whether or not he attains the result, because the outcome is not within human control. Sincerity of intention and striving are what truly matter.
Source: Sunan Nasa'i: Translation and Benefits by Shaykh Hafiz Muhammad Amin Hafizullah, Page: 5383