I have created a connector which works fine in Dev and has no problems when creating a dataset from Dev - however when I publish it I get error
'An error occurred during processing: Domo is ready, but the script has errors: "SyntaxError: Unexpected token < in JSON at position 0"; at line number 7; '
There is no problem with the code but apparently there is something in the returned data which DOMO Dev has no problem with however DOMO Prod cannot handle.
It seems to occur when I try to start Parsing the data "var jsonRes = JSON.parse(res);".
I there a good way to catch this error?
I'm pulling the data in pages of 10 so this section is:
for(i=0;i<1000;++i) {
var res = httprequest.get(baseUrl + "?cursor=" + Cursor);
var jsonRes = JSON.parse(res);
allData = allData.concat(jsonRes.data);
Cursor = jsonRes.pagination.nextCursor;
if(Cursor == null) {
break;
}
}