Fair comment about the Titanic.
But the story of the Da Vinci Code was trite, poorly written, and riddled with clichés.
However, on top of that, the history is risible, - and this is an area I know reasonably well as I taught it to undergrads for seven years; I'll forgive poor history, or unimaginative history, or illiterate history if the story is good.
Actually, I love historical fiction when it is carried off well; for example, Hilary Mantel's Thomas Cromwell novels are superb, as are those of Philip Pullman (his Sally Lockhart series).