In my last session the party was fighting some Wyverns. When one got near the sorcerer, he became invisible and moved out of its reach, but stayed between the Wyvern and the warlock. On its next turn, the Wyvern moved to attack the warlock, but to do so, it would have to move through the sorcerer's space.
On page 191 of the Player's Handbook, it states under "Moving Around Other Creatures":
[...] you can move through an hostile creature's space only if the creature is at least two sizes larger or smaller than you. Remember that another creature's space is difficult terrain for you.
The Wyvern is a Large creature, so it can't move through the space occupied by the sorcerer, but it would definitely try to do so to attack the nearest enemy.
What should be the proper resolution of this event according to the rules?
I made my call by letting the Wyvern, a Large creature, pass through the space and gave the sorcerer a choice to make a Dexterity saving throw to avoid being trampled, or a Strength saving throw to stop the creature's movement. The PC chose Dexterity and failed, so he got trampled. I considered the space difficult terrain for the Wyvern, used 2d6+4 as trample damage (same as for its Bite attack), concluded the movement out of the square occupied by the PC, left him prone, and made only the Stinger attack to maintain the average damage output.
I let my group know that it was my call to avoid stopping combat and searching for rules, and that in the future, the same situation may be managed differently according to official rules, but what are those rules?