Hives and welts are cardinal signs of an allergic reaction and very few other things, so I'm thinking that's what's happening! It's possible to be allergic to cocaine
but more likely your friend is allergic to one of the unfortunately many fillers and cuts that are put into cocaine.
The only way I can imagine to avoid this, other than not doing coke
(which is the best option, of course) would be to do an acetone wash or some other kind of wash. The directions are stickied at the top of this forum. It requires a few supplies and a little bit of time, but it would wash away most of the cuts.
The first and second allergic reactions to something are not as bad as the ones after because the body might not have already been sensitized/exposed to the allergen before this exposure...meaning that she might have a worse response next time. It probably won't be as bad as anaphylaxis requiring hospitalization, but if she continues to use cocaine PLEASE advise her to do so in or near the presence of a trusted friend if possible, at least for the next few uses, just in case it does end up progressing to that at any point! Even a renter in the basement, a parent upstairs, or a next door neighbour will do, just make sure someone's around who can be contacted quickly if needed. Better safe than sorry, anaphylaxis leads to throat swelling (ie: impossible to talk to a 911 operator, and it progresses quickly), shock and death.
She can also try taking an antihistamine
/allergy medication before taking cocaine, then one more a little later as well for the delayed response, since allergies are often biphasic and can reoccur hours after exposure to the allergen. If it's a minor allergic reaction, the med will minimize the hives and other allergic symptoms.
It most likely is a reaction to "bad product," though as I said it's possible it's an allergy to cocaine itself. Sadly, virtually all cocaine is cut with something, so it's almost all "bad product" though some is much better. If you're allergic to one of the cuts, though, even a tiny amount of it will trigger a reaction.
Stay safe and be well!