Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
PierfrancescoGirolami
Partner - Contributor II
Partner - Contributor II

Set ErrorMode and "General Script Error in statement handling"

Hello,

 sometime, not often, I get the "General Script Error in statement handling" when we make a URL call.

We are trying to manage this error including the "set ErrorMode=0" to make script continue also when we catch this error. But It seems this is not working properly as you can see from the following part of the script. We've set ErrorMode=0 but the script exited with error.

 20230729T163516.365+0200 0193 set ErrorMode=0
20230729T163516.365+0200 0194 TaskExecutionStatus:
20230729T163516.365+0200 0195 SQL SELECT
20230729T163516.365+0200 0196 "id" ,
20230729T163516.365+0200 0197 "status"
20230729T163516.365+0200 0198 FROM JSON (wrap off) "data" PK "__KEY_data"
20230729T163516.365+0200 0199 WITH CONNECTION( URL "https://xxx.yyy.com:4993/api/v1/tasks/[some_other_params[)
20230729T163516.527+0200 General Script Error in statement handling
20230729T163516.527+0200 Execution Failed
20230729T163516.551+0200 Execution finished.

Do you have any idea why the script exited even if the set ErrorMode=0 ?

Thank you!

Labels (1)
1 Reply
marcus_sommer

I don't know why it happens but I could imagine that this may occur if the error didn't comes from the script-part - see the help-text:

ErrorMode

This error variable determines what action is to be taken by Qlik Sense when an error is encountered during script execution.


This could mean that if the error comes from the outside - for example any security measure or temporary failure has prevented that Qlik could execute the script - no script error would occur which would be fetched from the error mode and therefore the load breaks.

Another thought goes to the returned ScriptError - if this value is invalid/undefined the error mode itself may break and with it the entire script.

If none from the R&D would shed some insights you will probably need some workarounds - maybe by outsourcing this part into a separate task and if it failed only this task died but not the following chain.