How long was your fast?
Ultimately like you said if things get worse go to the doctor.
If your fast was short duration this is likely something else.
I broke a 28 day fast badly before (went straight to carnivore) and the result was basically indigestion (ran right through me). My second fast of similar length I broke clean with fermented foods, eggs, raw cheese etc etc and I got swelling in my legs (likely from salt intake, but that went away).
What you’re describing isn’t similar to what I’ve experienced but with everything it’s a ymmv type of thing.