.doIf Exist else exit user in session


I want to feed usernames through a login procedure when a usernames passes he will get an id. if it fail I only want to exit that user and not quit the session. I just do not want failures in the other part of my session.

So i thought this would be proper syntax:

.doIf(session => session.isAttributeDefined(“Id”)) {
.doIf(session => session.isAttributeDefined("${Id}")) {

.doIf(session => session(“Id”).exists){
.doIf(session => session("${Id}").exists){

But non of these options work, the confusing thing is that on SOF this is a correct anwser.
Also I was wondering is I can exit a user (from a feeder) on fail or does Gatling exit the entire session on a failure.

Thank You,

the anwser
.doIf(session => session.contains(“Id”)) {}

Still looking for the other on (exit part)


exit that user and not quit the session

WDYM by “session” here? The run? Is so, that’s exactly what exitHereIfFailed is about: per user, not global.
Seems to me you’re reinventing the wheel here.

Perfect Tnx