Error is always subjective. Indian philosophers use standard examples to make their positions clear. One standard example of perceptual error is the rope-snake. Nyaya philosophers see memory is a source of knowledge, it is the perception of traces of past experience has left on the mind. The traces are not perceived by the five external senses, but presumably by manas , the mind, acting as an internal sense.
Memory plays a subsidiary but important role in perception.
It qualifies the way I perceive something. My memory of other things I have perceived in the past affexts the way I perceive the same or other things now. The world we perceive is the outward aspect of the world of minute, indivisible, unchangeable, eternal atoms. Atoms exist independently of our thoughts and our perceptions. They are the objective reality of the material cosmos.