Getting 418 Teapot error


Can any one confirm the below error.
When I am executing the UI scala recorded script, getting below issue.
HTTP response:
418 I’m a Teapot

{“reason”:“Invalid Session”}

Hi @Mahesh31,

Welcome aboard!


418 I’m a Teapot

This status is a joke (RFC was published as an April 1st fool)
Nonetheless, this status is often used in development server as error status.

The body:

{“reason”:“Invalid Session”}
Mean that your current session is invalid.

I guess that you used the recorder provided with Gatling, Execute some actions in your browser and log out.
I guess that the recorder records (its job), everything about the traffic, even the Cookies or other Authorization header containing the session. It was valid when you recorded, but not after.

You will have to manually variabilize that part.

I hope that helps!


“418 I’m a Teapot” is an April fools’ joke. I don’t think you should be using this for a production application…

I guess that your recoding has some hardcoded security tokens that should not be hardcoded but that you should capture instead. You’re getting this error because they have expired.

Yes…I am recorded and when I saw in insepct elements, no sessions observed

This most likely means that you’ve recorded while you were already authenticated, so the recorded script is missing the authentication part and is directly trying to hit APIs that require being authenticated, hence the failure.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.