"SyntaxError: Unexpected token: u (sys_script_include.d2426c9ec0a8016501958bf2ac79c775.script; line 155 but there is Script Include I am calling from there

karan chhabra5
Tera Contributor

Hi there..!! I am trying to send  attachments to another instance from my instance to another  and have written a Unidirectional integration.I have written RestMessage (POST)at my instance and Scripted Rest POST at another instance I want to hit and attach the file to.I am now getting an error in response Object:----{"error":{"detail":"SyntaxError: Unexpected token: u (sys_script_include.d2426c9ec0a8016501958bf2ac79c775.script; line 155)","message":"Unexpected token: u"},"status":"failure"}

9 REPLIES 9

Thilo Grobe
Giga Guru

Check if you are calling JSON.parse() in your scripted POST. This error happens when calling the JSON.parse method with an undefined string variable. Just write the value to the log for debugging. 

Hope this helps,

Thilo

Hi Thilo,

Even i'm facing issue sometimes on my workflow

Even i write the value to the logs, its not printing.

 

Can you please help me here?

 

Thanks,

Sri

 

Thank you so much it works for me 

Hi,

 

How you fix this issue?