
A taste/dose of your own medicine
Informal Idiom
This phrase is casual, often used among friends or in relaxed settings, not in formal situations. 
Negative Experience
The phrase usually refers to an unpleasant experience, emphasizing fairness or irony. 
Consequence-Driven
Use it when someone faces consequences directly linked to their actions. 