It is "bark up the wrong tree". When someone is told he/she barks up the wrong tree, it makes that he/she is making a mistake by saying/doing something. For example: John: Xerxes, you are a difficult person.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.