Allergic reactions are not random. If you're having an allergic reaction
to a component of diet
coke, you will suffer the reaction whenever you drink it.
Manufactured sodas are very consistent, so if you're having some sort of reaction some of the times you drink it, you're reacting to something else - you're just associating it with diet coke. Your doctor or allergist can help you sort this out.