Conditional execution of steps


I’m trying to use the following setup. In the simulation I have numerous steps and the execution of some of them depend on the successful execution of a previous one. How can I skip a block of steps if one step has failed? For example if get has failed, I want to skip the next 2 steps.

object Agent {

val login = exec(http(“Login agent”)

val get = exec(http(“Get agent”)

You can use doIf, for ex. get response code from request 1 and then if it is 200 or your any condition do next block