Is there a way to abort processing a sampler (HTTP Request) when any of the pre-processors execution is failed?
Scenario:
- There is a JSR223 Pre-processor associated with an HTTP Request
- The JSON payload (request body) is created dynamically inside the JSR223 Preprocessor.
- The JSON payload is not created successfully at certain times.
- HTTP requests should not be sent when the JSON payload is not created successfully.
I have tried following within a try-catch block of the JSR223 Pre-processor.
try {
//JSON playload creating script
}catch(anything){
ctx.setRestartNextLoop(true);
}
This does not abort the execution of the current sampler. Processing JSON payload outside the samplers may not be an elegant solution.