4 answers
It depends on how close you are to the person inviting you, but in general the most respectful thing is to give them a heads up in advance if you have any special dietary needs! If you really can't eat what they're making, maybe offer to bring a dish to share, or eat a bit of what's there and explain politely but honestly that it's just not your thing. The important thing is not to make a big deal out of it or hurt the feelings of whoever cooked, since they made an effort anyway! If the person is reasonable they'll understand, and if you really can't eat anything at least try a little bit and enjoy the company.
It's happened to me more than once, and the best thing is to communicate your dietary restrictions in advance - that way whoever's cooking can organize themselves without stress. If you didn't mention it before and you find yourself at the table, you can always taste what's there (even just a little) and genuinely compliment the effort, maybe saying you ate before or just don't have much of an appetite. The important thing is not to make a big deal out of it or make whoever cooked feel bad, because the generosity of inviting you is what really matters.
The thing nobody ever says is that the real problem hits when you're already sitting at the table! Giving a heads-up beforehand is crucial, but if you happen to not have done it and you find yourself facing something you can't eat, just eat what you can without stressing too much about it and still show appreciation to whoever cooked. People genuinely appreciate the gesture way more than you think - if they see that you at least taste it and show interest, you won't see them offended the way you're imagining. Then maybe you help clear the table afterward or bring dessert next time, and that's that.
The point that others overlooked is how much the *timing* of this communication matters. Warning someone the day before or even that morning can put your host in a difficult position, especially if they've already done the shopping. If you know you're going to someone's place for dinner, the smart move is to say something like "by the way, I'm vegan" or "I don't eat fish" while there's still time to change plans. That way you avoid that awkward situation where the other person feels guilty and you feel like a burden.
What actually happens at the table, when you haven't warned them beforehand, is that refusing the dish risks actually hurting them. It's not a matter of abstract politeness: the person who cooked put in time, thought about you. Telling them "no thanks, I don't like it" or worse lying ("I ate late") creates tension that nobody wants. That's why communicating early isn't demanding, it's the opposite: it's avoiding unnecessary drama.
If you do find yourself already seated and the food is unmanageable for you (allergy, serious ethical choice), then be honest but kind: "I'm sorry, I know you went to the effort, but I really can't." Offer to help in the kitchen or bring something next time. People understand better than you think when they sense sincerity. The real disaster is pretending to eat and that's it.
Your answer
Log into answer.