DMG, Forced Movement and Terrain, page 44.
Targets of forced movement into hindering terrain (pits, precipices, fire) can avoid plunging into a pit or over the edge of a cliff or being pushed into a raging fire. The creature makes a saving throw rolled immediately before entering the unsafe square, with success leaving the creature prone at the edge of the precipice.
You can also choose to move a character OVER the hindering terrain. So, if the forced movement is enough to clear the pit, you can have the creature make it over the pit instead of giving the creature an opportunity to save.