I’d like to extract and display that error message in the HTML report instead of the default generated “status.find.is(200), but actually found 500”, see snapshot:
Since the JSON attribute is only present for error responses, I used instead:
jsonPath("$.details").withDefault("").is("")
If you have a better solution, I’m all ears.
Now I’m facing a secondary issue. The error response comes with a 500 status. As a consequence Gatling considers that the request failed and displays this in the HTML report instead of my “custom” message:
status.find.is(200), but actually found 500
I tried to ignore such 500 status but nothing worked. I tried multiple solutions: