You might have accidentally added to much baking powder, or used baking soda instead of baking powder. A tiny amount of baking powder is needed to help your mug cake rise, but if too much is added, it will leave a bitter, metallic aftertaste.