Abdul-Rahman bin Abu Bakra reported,

My father dictated a letter, and I wrote it on his behalf, to Ubaydullah bin Abu Bakra, who was then the judge of Sijistan, saying, "Do not pass judgment between two parties while you are angry, for I heard the Messenger of Allah ﷺ say, 'No one should pass judgment between two parties while he is angry.'"

Nasai 5408

Sahih

أخبرنا قتيبة قال حدثنا أبو عوانة عن عبد الملك بن عمير

عن عبد الرحمن بن أبي بكرة قال

كتب أبي وكتبت له إلى عبيد الله بن أبي بكرة وهو قاضي سجستان أن لا تحكم بين اثنين وأنت غضبان فإني سمعت رسول الله ﷺ يقول لا يحكم أحد بين اثنين وهو غضبان

النسائي 5408صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Etiquette of judges
Chapter
What a judge should avoid
Numbering
Darussalam 5408
Nasai 5408