Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE

REST API task is failing Intermittently with General Script Error in statement handling

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Alan_Slaughter
Support
Support

REST API task is failing Intermittently with General Script Error in statement handling

Last Update:

Sep 1, 2021 5:42:03 AM

Updated By:

Sonja_Bauernfeind

Created date:

Aug 30, 2021 7:23:01 AM

"RestConnectorMasterTable" General Script Error in statement handling

RestConnectorMasterTable:
20200826T102106.344+0000 0088 SQL SELECT
20200826T102106.344+0000 0089 "name",
20200826T102106.344+0000 0090 "value"
20200826T102106.344+0000 0091 FROM JSON (wrap off) "contactCustomData"
20200826T102106.344+0000 0092 WITH CONNECTION (
20200826T102106.344+0000 0093 URL "      ",
20200826T102106.344+0000 0094 HTTPHEADER "Authorization" "**Token removed for security purpose**"
20200826T102106.344+0000 0095 )
20200826T102106.967+0000 General Script Error in statement handling
20200826T102106.982+0000 Execution Failed
20200826T102106.986+0000 Execution finished.

 

Environment

 

Resolution

 

To be able to catch the exact error and mitigate the issue they need to apply our recommended best practices for error handling in Qlik scripting using the Error variables
Error variables 
Script control statements 

Set to ErrorMode=0 it will ignore any errors and continue with the script. You can use the IF statement to retry the connection or move to another connection for a few attempts and then it will change it to ErrorMode=1 and fail or just disconnect on its own.

A sample script is located here, but further options can be added from the Help links already provided.
Qlik-Sense-fail-and-retry-connection-sample-script 

Note: QlikView scripting is the same in these functions for Qlik Sense unless otherwise stated, but there are some very helpful items in the links.
Best-Practice-Error-Handling-in-Script 

 

Cause 

Error with the fetch of the token with the rest call. If the number of rows in a table doesn't match or is less than expected, trigger the script to throw an error and have it try to load the table again for more records, or if the count is off, do a Loop until returns the correct number.

 

Internal Investigation ID(s) 

QB-3164

Labels (1)
Version history
Last update:
‎2021-09-01 05:42 AM
Updated by: