Help

J: Error: Failed hyperAssert: rowJson

Topic Labels: Scripting extentions
929 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Kosta_Kondraten
7 - App Architect
7 - App Architect

What does this error mean?

j: Error: Failed hyperAssert: rowJson
at main on line 24

Here is the code I have:

let table = base.getTable("SMS");
let view = table.getView("Kosta");

let json_response = '{"action": "linkcreator", "data": [{"id": "recpuidwtkoxhyylo", "name": "kosta kondratenko", "url": "https: \/\/headstudios. Com. Au\/for_you\/sales-terminator-army-generator\/", "shortlink": "", "linkid": "lnk_1lhi_2rcwr8", "mobile": ["0412 826 569"], "path": "kostas-terminator", "displayname": "kosta", "originalurl": "https: \/\/headstudios. Com. Au\/for_you\/sales-terminator-army-generator\/? Fname=kosta", "secureshorturl": "https: \/\/showme. Headstudios. Com. Au\/kostas-terminator"}, {"id": "rec2nv7qklwu5jmbv", "name": "kostya kondratenko", "url": "https: \/\/headstudios. Com. Au\/for_you\/sales-terminator-army-generator\/", "shortlink": "", "linkid": "lnk_1lhi_2rcwr9", "mobile": ["+61412 826 569"], "path": "kostyas-terminator", "displayname": "kostya", "originalurl": "https: \/\/headstudios. Com. Au\/for_you\/sales-terminator-army-generator\/? Fname=kostya", "secureshorturl": "https: \/\/showme. Headstudios. Com. Au\/kostyas-terminator"}, {"id": "recheks3mmpdtznve", "name": "konstantin kondratenko", "url": "https: \/\/headstudios. Com. Au\/for_you\/sales-terminator-army-generator\/", "shortlink": "", "linkid": "lnk_1lhi_2rcwra", "mobile": ["4128 265 69"], "path": "konstantins-terminator", "displayname": "konstantin", "originalurl": "https: \/\/headstudios. Com. Au\/for_you\/sales-terminator-army-generator\/? Fname=konstantin", "secureshorturl": "https: \/\/showme. Headstudios. Com. Au\/konstantins-terminator"}]}';

let body = JSON.parse(json_response);

console.log(body);

console.log(body['action']);

let data = body['data'];

switch(body['action']) {
    case 'linkcreator':
        for (var key in data) {
            let RecordID = data[key]['id'];
            let LinkID = data[key]['linkid'];
            let ShortLink = data[key]['secureshorturl'];
            console.log("Record ID is: ");
            console.log(data[key]['id']);
            RecordID = 'recheks3mmpdtznve';
            console.log("Key is: " + key);
            await table.updateRecordAsync(RecordID, {
                //"LinkID": LinkID,
                "LinkID":"Loyalty" // this seems to be where the problem is causing.. it's just a text field
                //"Shortlink": ShortLink
            }); 
        }
        break;
}

This problem didn’t seem to come up before… and the LinkID is just plain text… like there shouldn’t be any issue but that error is so weird - by the way I searched that error on Google and couldn’t find like a single result.

UPDATE: I think I’m getting to the bottom of it… the JSON that is returned from my endpoint seems to transform everythign to lowercase… so ‘recpuIDwtkOxhYyLO’ RecordID becomes ‘recpuidwtkoxhyylo’… I’m guessing if the casing is gone I’m in trouble and have to look at my script source to where it gets lower cased…

Thank you!

0 Replies 0