There's a certain beauty when it comes to flaws in literary works. They expose a certain hidden layer in texts, one that is very much apparent in our every day life, but that is often denied in discussing and reviewing literature.
We could call these flaws "imperfections." Though to do so would claim that these flaws were, at all times, conscious, deliberate. That even when the Author makes a mistake, it is a planned mistake; one that should have been made, not one that simply was made. It denies the fact that Authors (and more so, writers) do make mistakes; in most literary works; often. And not all of these mistakes are caught by editors because not every flaw looks, feels, and reads like a mistake.
A continuity error is an unsubtle flaw, one that should be and often is caught by editors. Whenever a novel is published with spelling and grammar errors (plural) in it, we can assume they are deliberate. A singular spelling error is not, of course; it would be wrong to call this a real flaw. It is one, but it would be foolish to build a case around it. These singular errors are often corrected in a next edition; the writer, or editor, or a reader with more than 1,000 followers on Twitter, notices these and makes an effort to have it corrected.
However, a character acting out of character [p.n.i.]1 is a flaw. The quiet and reserved leading lady, always in the background, always the victim of a scheme or betrayal, in one instance of the text acting up, then, for the remainder of the story not acting up or being in the foreground or standing up for herself, is a literary flaw.
The instance where the protagonist is acting up serves a purpose. Without a doubt it is a deliberate attempt of the Author to make a point. And it may well serve the storyline, and make a good read. But you cannot have an elephant suddenly turn into a bald eagle and then back into an elephant just to make a point. A plumber making an executive order and then going back to plumbing to continue his life's story without any trace or hint of ever having run for the presidency cannot be convincingly incorporated into a story; but more than often a literary character changes their stripes for just one sentence or paragraph to serve an Author's point.
A single revelation (contained in a single sentence) in L'Éducation sentimentale serves as an example of a literary flaw. Monsieur Arnoux, Frédéric's love interest's husband, is a Jacques of all trades [p.i]2 and a tireless capitalist with self-made morals. It is clear who he is and what he is throughout the entire novel; from the first time he invites Frédéric to one of his interesting night-time meetings, and his escapades with females, to the great escape when his debt and capitalist flirts have gotten the better of him.
And then, after "a fit of sickness" he becomes religious according to the narrator, and enters the business of selling rosaries and religious articles.3
A convenient detail; in my eyes a little bit too convenient to be truthful. But it helps establishing why the man is suddenly selling religion in the form of beads, crosses, and imagery. Of course, soon after he is back to being a cold-hearted capitalist, industrialist, and owner of sinful debt, without any mention of his religious nature.
Naturally, the narrator could have been a bit cynical about his sudden turn to religion. It would not be the first time a Flaubertian narrator would be; we can recall a certain person receiving the Légion d'honneur. However, that was still a straight-forward sentence; meaning that he actually did receive the decoration. And it is not uncommon for a nineteenth-century character to turn to religion after a period of sickness.
Was it a God-honest turn but did the narrator (and Arnoux himself) just forgot this his newfound religious nature, or was it a convenient proclamation by the (unconscious) Author to serve a purpose and then be discarded? Either way, it counts as a flaw; and in either way, the flaw is unplanned.
In the opening, I said that these flaws expose a hidden layer. Let me elaborate on that. We want our literary characters to be stable; which does not actually mean that they have to be stable. A character can be the most outrageous, bipolar, random person in the story: but please let this character be like that throughout the entire text. When Anna Arkadyevna is an unstable Romantic, fine: but she should be (and is) one from the narrator's first word on her to the narrator's last.
And yet in real life, how quiet an introvert may be ninety-nine per cent of the time, there is always that one per cent, those seven thousand, four hundred and forty-six hours in a lifetime (on average) that they are not for a very specific reason. We might not always be there when it happens, but it does. With a text, we (unfortunately?) are there when they do, when they break character for just a single sentence to serve a purpose. And it always feels (too) deliberate.