The throttle position sensor on the throttle body continuously reports throttle position by increasing or decreasing voltage that is sent to the engine electronic control unit (ECU). The ECU uses the information received from the sensor to provide the necessary power in the appropriate amount of time.
When the throttle position sensor is defective then there may be problems such as hesitation when accelerating or idling, or rich or lean fuel. When the sensor is faulty, it may just need adjusting or it could need replacing.
The throttle position sensor is usually covered under the federal emissions warranty section of the manufacturer's factory warranty. In some cases, the sensor could be covered under the bumper-to-bumper section of the factory warranty as well. There are also extended car warranties available that will cover the throttle position sensor depending upon the level of coverage.