When recording the script , it has passed only one request and has got a JSON response.
But when replays same request has send three times and first two request gets 401 status and only the last request gets correct response with 200 status.
I have capture a correlation value in that response. the issue is when it pass three requests , correlation gets failed and if it pass only one request, can capture the correct correlation value. For the same request sometimes it passes only one request some times it passes three requests as mention above.
1. Is there a way to handle this issue?
2. Is there a way to avoid getting 401 status, when it pass three requests?
(I am using an external javascript file to capture whole JSON response)
When it pass three requests as mention above, getting the following error message:
Error - 26000: Error from JS Engine: "<file path of Javascript file> : 3: SyntaxError: JSON.parse: Unexpected non-whitespace character after JSON data
"