The way you handled it does technically fulfilfulfill the "worse outcome" choice for the GM.
Also, you didn't use any of your Moves formfrom the GM Moves list, which you always do when everyone looks to you to see what happens. AndMoreover, and I think this is the key point for the answer to your question, they do look at you to see what kind of worse outcome, hard bargain, or ugly choice you will offer them! This means you will make a GM move that represents a worse outcome, hard bargain, or ugly choice, probably a soft move, as it was a partial success, but depending on the circumstances it could already be a hard move.
You could offer an opportunity, with or without cost: "As you sprint towards the Troll to get past it, it smashed down its club right onto you. At the last moment, you take a final leap forward to dodge the blow, but fumble your landing roll and come to a stop on your back, right below the creature's private parts. You have a moment to think about your situation, as the Troll gathers that it must have missed, assince there's no red mush on its club. What do you do?
You could, as a hard move that follows from previously established fiction, deal damage: "As you already realised the last time you tried to dodge past a Troll in this cave, these are really nimble and skilled Trolls! Still, you need to get past this one to reach the lever, so you take all your courage and sprint off. You might have expected it, but you didn't see it coming. The Troll realises what you want to do and swaps its club to the other hand, making a swift strike at your back as you sprint past it. The force of the blow hurls you forward a couple dozen ropelengths and you would have felt your spine shattering, wasn'twere it not for your heavy duty sleeping bag that you packed for this cold climate protecting your back. Take 1d10 damage, ignoring armor, and the Shaky debility, because that blow really shook you up. You are now flat on your stomach within arm's reach of the lever you wanted to reach. What do you do?"