The URL and the data sent across appear to be fine. We return 400 when a server error occurs, but our code also returns the exception message when we return 400 due to a server error on the conversion request. I tested the live packages on my local site and was able to do a client conversion successfully in both http and https protocols. Was this test created against the live packages? Or was it created in a previous version and upgraded mid test?
Hi @Jason. The A/B test was created on version 2.3.1 but when we first installed the A/B testing add-on it was version 2.3.0.
I wasn't able to intercept any server side exception. I will try again to see if I can get more information for you.
Hi again. Actually, the debugger in Chrome write out the following including the exception:
POST http://local.domain.nl/api/episerver/testing/UpdateClientConversion 400 (Bad Request) 400: 400:{ "message": "An error has occurred.", "exceptionMessage": "Value was either too large or too small for an Int16.", "exceptionType": "System.Exception", "stackTrace": null } 400:{ "message": "An error has occurred.", "exceptionMessage": "Value was either too large or too small for an Int16.", "exceptionType": "System.Exception", "stackTrace": null }
Is this useful yo you?
A page view is being counted in the test, but no conversion is being recorded.
The data that is being sent is this:
testId: 1d296edb-c436-4296-87b9-f7b4aa255c9f
itemVersion: 2176865
kpiId: d17b602b-c844-48df-88a0-d876996d3a64
Perhaps you need to support itemVersion numbers higher than Int16?
You are right Dennis we are parsing ItemVersion as a 16 bit int instead of a 32 bit int that the test data is returning. I will make a bug for this and get it fixed up right away as it is a very easy change that should have never been there in the first place. Thanks for your help in finding this.
I have tried to setup an A/B test with a goal to test if a user stays on the page for 10 seconds or more. After the 10 seconds I can see that in the console the the following URL is being loaded: https://domain.com/api/episerver/testing/SaveKpiResult
However, the console logs a "400 (Bad Request)" error.
The debugger shows me that the xhttpData contains the following: "testId=e2ed349b-e091-4564-b33a-cfa6e22b9376&itemVersion=1695874&kpiId=c389d8a0-eb26-42d3-b633-861321f2971e"
I don't see any other useful information in the browser console as to why the request fails.
We have version 2.3.1 installed.
Any help to solve this would be appreciated.