Is there a sensor for gas pedal completely pierced?

Moin, background is this: with my 2.0 l 10-valve, the following happens: If I go through the accelerator all the way, then it swallows (mostly) once and the motor control light goes on, but then goes on normally. If I remove the battery cable and hold together, the error is deleted again. I have at least for another week no way to read the error (flashing out via ODB socket). I can reliably reproduce the error. There is nothing like this just before the floor plate, no swallowing, no lamp. Only when I arrive at the stop with the accelerator pedal, do the above-mentioned symptoms, and always the lamp arrive (the swallowing sometimes doesn’t come). Is there a switch/sensor that triggers something?