Very difficult to know where to draw a line; my feeling is that even if history shows the people were wrong the government should not be allowed to (directly or indirectly) do something other than what they were elected to do - i.e. serve the people (on a plate, it seems).
And I write this from the losing side (in the referendum); about the only way it could get worse if it turns I'm on the winning side in the end (cf. Boaty McBoatface; the people were asked to vote for the name of the vehicle, but the powers that be didn't like such a frivolous name so they reneged and called it the RRS Sir David Attenborough instead. The parallel should be obvious).
Edit: toned down the rhetoric.
Governments do this all the time, though. Campaign promises are often just that.
These direct democracy votes often turn out this way - the people vote on a topic differently than how they vote for representatives. But a large portion of why we don't practice direct democracy in most of the west is because you don't want a mob of opinions dictating national law.
It isn't undemocratic for democratically elected representatives to go against a referendum. They were elected to rule on behalf of their people, even if that is in contradiction to non-binding votes by said people. Its their reelection funeral if they go against popular opinion and turn out wrong, but its their job to do it if they think its right. Its why we have representatives in the first place!
The problem here is that they went ahead and voted for it, without actually doing the hard work of drafting a concrete proposal for how Brexit will happen.
1. Article 50 is an exceptionally poor piece of legislation if your objective is to deliver a smooth and equitable separation from the Union.
2. The Irish border is very sensitive and prone to violence, and the Irish government has successfully ensured that their concerns addressed in the form that they have been, within the withdrawal agreement.