I'd say it's more like the error of calling a tomato a vegetable. While it's true that from a phylogenetic perspective that pterosauria aren't dinosaurs, they still have many basal characteristics (relative to today's flying dinosaurs, the aves) that give them a certain dinosaur-like quality in the imagination. Besides, they're contemporaneous with the true dinosaurs. Grouping them with the dinosaurs is understandable. The grouping is incorrect under one classification scheme, but correct under another.
BTW: this site screws up copy and paste, appending marketing junk to any text copied to the clipboard. I wish it were possible to prohibit these clipboard shenanigans.