What is the literary term for not keeping a story consistent?

Solution 1:

The term "plot hole" is an example of that, but more details are required to know if that's what you mean.

In fiction, a plot hole, plothole or plot error is a gap or inconsistency in a storyline that goes against the flow of logic established by the story's plot.1

Solution 2:

If a character puts something down on a table in one scene, but picks it up again from a counter in another scene, that's a continuity error.

From Wikipedia:

In fiction, continuity is consistency of the characteristics of people, plot, objects, and places seen by the reader or viewer over some period of time. It is relevant to several media.

Continuity is particularly a concern in the production of film and television due to the difficulty of rectifying an error in continuity after shooting has wrapped up. It also applies to other art forms, including novels, comics, and video games, though usually on a smaller scale. It also applies to fiction used by persons, corporations, and governments in the public eye. … 

Most continuity errors are subtle and minor, such as changes in the level of drink in a character's glass or the length of a cigarette, and can be permitted with relative indifference even to the final cut. Others can be more noticeable, such as sudden drastic changes in appearance of a character. Such errors in continuity can ruin the illusion of realism and affect suspension of disbelief. … 

The article goes on to list several specific types of continuity errors, such as visual errors, plot errors, Homeric nods, and aging discrepancies. With respect to this question specifically, it seems what you're looking for is a plot error.

Sometimes, continuity errors can be introduced deliberately, such as when a character in a piece of fiction is meant to notice something that's out of place.