The frame story in "The Custom House" makes clear that the narrator of the novel is unreliable:
I must not be understood as affirming, that, in the dressing up of the tale, and imagining the motives and modes of passion that influenced the characters who figure in it, I have invariably confined myself within the limits of the old Surveyor's half a dozen sheets of foolscap. On the contrary, I have allowed myself, as to such points, nearly or altogether as much license as if the facts had been entirely of my own invention. What I contend for is the authenticity of the outline.
The frame narrator carefully describes his process of archival research, and then how he proceeded to make everything up based on a very small amount of evidence. The frame narrator is playing with the idea of "authenticity." He claims that the "outline" is authentic and that everything else is his invention, suggesting that readers should trust him to convey the truth while distrusting the details of the narrative.
This dance between trust and distrust requires an attentive reader: it is incumbent on the reader to determine what is "authentic" and what is made up. For instance, Chapter 24 includes the narrator's speculations about what might have happened to Pearl after the end of the novel. The reader can decide what to believe. But if the reader remembers that Pearl herself is made up, it becomes more obvious that the narrator wants the reader to search for a deeper truth. The narrator's unreliability doesn't necessarily undermine the efficacy or value of the novel. Rather, the "based on a true story" setup ultimately implies that the details don't matter so much as the truth the story reveals about American history and culture.