Unanswered question

Receive 412 error code after checking validation

Neoload found errors when validate the user path, all errors have 412 response code. When I compare the request between the validation and the recorded ones, they appear to be different. For instance, in the validation request, the Accept-Encoding is gzip, however, in the recorded one, its value is gzip, deflate, br.

I am not sure if that's what cause the error, however, I wonder why Neoload change the request, and how can I change it back to be consistent with the recorded ones.

Teresa W.
Teresa W.

Teresa W.

Level
0
12 / 100
points

Answers

Christophe M.
Christophe M.

Christophe M.

Level
3
3454 / 5000
points
Team

It's not related to the encoding. The 412 HTTP Code is related to headers like If-Match or If-Unmodified-Since, typically for POST or PUT requests to avoid concurrent modifications.

The response code is 412 because an updated element in the User Path has been updated on the server since the recording.

Can you confirm that the request that fails has a 'If-Match' header or a 'If-Unmodified-Since' ? I'll check if the mechanism in NeoLoad that automatically updates the 'If-none-match' header value also works for 'if-match'.

Teresa W.
Teresa W.

Teresa W.

Level
0
12 / 100
points

Christophe - Thank you for the response. I just checked the requests with 412 response codes, they don't have 'If-Match' or 'If-Unmodified-Since' header.