When a judge gives a decision, having tried his best to decide correctly and is right, there are two rewards for him; and if he gave a judgment after having tried his best (to arrive at a correct decision) but erred, there is one reward for him.
أَنَّهُ سَمِعَ رَسُولَ اللَّهِ ﷺ قَالَ إِذَا حَكَمَ الْحَاكِمُ فَاجْتَهَدَ ثُمَّ أَصَابَ فَلَهُ أَجْرَانِ وَإِذَا حَكَمَ فَاجْتَهَدَ ثُمَّ أَخْطَأَ فَلَهُ أَجْرٌ