Genesis 40:2-3

40:2 Pharaoh was enraged with his two officials, the cupbearer and the baker, 40:3 so he imprisoned them in the house of the captain of the guard in the same facility where Joseph was confined.

tn The Hebrew word סָרִיס (saris), used here of these two men and of Potiphar (see 39:1), normally means “eunuch.” But evidence from Akkadian texts shows that in early times the title was used of a court official in general. Only later did it become more specialized in its use.