SyntaxError: Unexpected token: u (sys_script_include.d2426c9ec0a8016501958bf2ac79c775.script; line 1

Surendra6
Tera Contributor

while we are updating work-notes from remedy to snow, we are receiving below response.

 

SyntaxError: Unexpected token: u (sys_script_include.d2426c9ec0a8016501958bf2ac79c775.script; line 155)"},"status":"failure"}]

 

in the scripted rest api patch method we added the below code about the work notes to copy.

 

Surendra6_0-1677155813839.png

Please help to fix this issue and update the work notes properly.

 

Thank you!!

6 REPLIES 6

@Surendra6 - Please add the below line after line no 48 (as per the screenshot in your question)

 

 

gs.info("js_response is "+ js_response);

 

Post addition of above code execute the integration and check the system log by navigate to 

All > System logs > System log > All for message starts with "js_response is" and share the details

VasantharajanN_0-1677212712787.png

 


Thanks & Regards,
Vasanth

Hello

 

if JSON data is not correct and if you are not converting JSON data to String then this error will come, so we need to format JSON Data first and properly convert to String and parse it.

 

Thank You