Cardiff held off a late Glasgow fightback after Ryan Grant grabbed the only try of the game, but they effectively won the match late in the first half when they survived a series of scrums on their five-metre line.
Glasgow's handling let them down throughout, most notably when Sean Maitland dropped the ball on the try-line, but Townsend felt his side should have been awarded a penalty try moments earlier when Cardiff skipper Sam Hobbs was sin-binned by French referee Pascal Gauzere for the third scrum offence in quick succession.
And Townsend's frustration was soon compounded when Rob Harley was penalised for obstruction by the video referee after Niko Matawalu had dived over in the 36th minute.
Townsend, whose bottom-placed side are staring at European exit, said: "I have to say the try that Niko scored was a clear try in my book. If you're clearing a ruck and someone hits and goes through that hole, then it's a try. I must be coaching something different, I don't know those laws.
"And to have penalty after penalty from scrum and from them to kick through the ball at the scrum, illegally I believe, and not to get a penalty try for that was very frustrating and disappointing.
"The effort to put into that and score what we believe were two tries and get nothing was tough."
But Cardiff director of rugby Phil Davies felt his side's defending merited the points which put them top of Pool Two following their second win over Glasgow in eight days.
"Glasgow showed a lot of tenacity to try to get over the line and we showed a similar amount to try to stop them," he said.
"It's the referee's call and that's the way the game goes. But I thought overall our determination deserved to get a result.
"They got a bit of ascendancy there but we sorted certain things out over the course of the game."
Davies added: "It was a great result, it wasn't pretty. They were pretty greasy conditions but we were very dogged and determined without the ball and ambitious with the ball considering the conditions.
"We have 13 players missing but that's been the case for the last seven weeks and the players that have come in rose to the challenge."
Townsend rued the errors that cost his side, although he put handling mistakes down to the conditions to a certain extent.
"We have missed out on Europe again," he said. "We are all aware that to progress in this competition you have to play close to your best. We have done that in a game and a half. The last two weeks we haven't been close to our best and we have paid the price."
- Sports & Recreation