the joke is on someone
US /ðə dʒoʊk ɪz ɑn ˈsʌmˌwʌn/
UK /ðə dʒoʊk ɪz ɑn ˈsʌmˌwʌn/

1.
la blague est sur quelqu'un, le rire est sur quelqu'un
used to say that someone who has tried to make another person look silly has in fact been made to look silly themselves
:
•
He thought he was being clever by tricking me, but the joke is on him now that I've exposed his lies.
Il pensait être malin en me trompant, mais la blague est sur lui maintenant que j'ai exposé ses mensonges.
•
They tried to embarrass her with a prank, but when it backfired, the joke was on them.
Ils ont essayé de l'embarrasser avec une farce, mais quand ça a mal tourné, la blague était sur eux.