Is this a permanent change or a one off? Sometimes they can be of stock of a particular brand and they need to give you an alternative to fill your prescription. But do let the pharmacy know about your issues so that they can sort things out.
I had (different) problems when I was changed to a particular alternative brand and our pharmacist changed it for me, and made a note on my records. And she always checks with me now if my regular brand isn't available when I request my repeats.
Robbity