<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to handle &amp;quot;NULL&amp;quot; response in REST API Connector in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-handle-quot-NULL-quot-response-in-REST-API-Connector/m-p/2072393#M12293</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/226332"&gt;@SBN&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Maybe try to change error mode, this should ignore the error and go to the next variable/month.&lt;/P&gt;
&lt;P&gt;Before the rest extract&lt;/P&gt;
&lt;P&gt;Set = errormode = '0';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 May 2023 11:25:12 GMT</pubDate>
    <dc:creator>williejacobs</dc:creator>
    <dc:date>2023-05-17T11:25:12Z</dc:date>
    <item>
      <title>How to handle "NULL" response in REST API Connector</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-handle-quot-NULL-quot-response-in-REST-API-Connector/m-p/2068674#M12258</link>
      <description>&lt;P&gt;Hi fellow Qlik enthousiasts,&lt;/P&gt;
&lt;P&gt;I'm connecting Qlik Sense to a REST API through the REST API Connector.&lt;BR /&gt;The first connector refreshes the Bearer token with a post request and serves this token in a variable to the second connector to get the information.&lt;/P&gt;
&lt;P&gt;The REST API requires a mandatory year and month parameter in the URL:&lt;BR /&gt;&lt;A href="https://apiurl/v1/feedbackData?year=2023&amp;amp;month=5" target="_blank"&gt;https://apiurl/v1/feedbackData?year=2023&amp;amp;month=5&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I've managed to create a load script that runs through a number of years and months, but throws the following error when it encounters a month without any data: "Unable to parse the input JSON: PropertyName token is expected.".&lt;/P&gt;
&lt;P&gt;When I use Postman to test this particular month it shows me the following result:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SBN_0-1683548612457.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/106638iC711E8D3B9A1090E/image-size/large?v=v2&amp;amp;px=999" role="button" title="SBN_0-1683548612457.png" alt="SBN_0-1683548612457.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The response headers show that it's a json content type response:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SBN_1-1683548678568.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/106639i51A4A48741E4EA64/image-size/large?v=v2&amp;amp;px=999" role="button" title="SBN_1-1683548678568.png" alt="SBN_1-1683548678568.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;But as you can see the body is empty.&lt;/P&gt;
&lt;P&gt;My load script starts with the following:&lt;/P&gt;
&lt;P&gt;---------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;[FeedbackDataTemp]:&lt;BR /&gt;SQL SELECT &lt;BR /&gt;"__KEY_root",&lt;BR /&gt;(SELECT &lt;BR /&gt;"__FK_feedbackData",&lt;BR /&gt;"__KEY_feedbackData",&lt;BR /&gt;(SELECT &lt;BR /&gt;"id" AS "id_u5",&lt;BR /&gt;"date",&lt;BR /&gt;"email",&lt;BR /&gt;"formatId" AS "formatId_u0",&lt;BR /&gt;"unitId",&lt;BR /&gt;"transactionCode",&lt;BR /&gt;"customerCode",&lt;BR /&gt;"lastName",&lt;BR /&gt;"gender",&lt;BR /&gt;etc.&lt;/P&gt;
&lt;P&gt;WITH CONNECTION (&lt;BR /&gt;URL "$(vApiURL)",&lt;BR /&gt;HTTPHEADER "Authorization" "Bearer $(APIToken)",&lt;BR /&gt;HTTPHEADER "Accept" "application/json;charset=utf-8"&lt;BR /&gt;);&lt;/P&gt;
&lt;P&gt;---------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;In case of an "empty" response these fields are not available and than I guess the connector throws this error.&lt;/P&gt;
&lt;P&gt;What can I do to detect the empty response?&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;SBN&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2023 12:32:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-handle-quot-NULL-quot-response-in-REST-API-Connector/m-p/2068674#M12258</guid>
      <dc:creator>SBN</dc:creator>
      <dc:date>2023-05-08T12:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle "NULL" response in REST API Connector</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-handle-quot-NULL-quot-response-in-REST-API-Connector/m-p/2072393#M12293</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/226332"&gt;@SBN&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Maybe try to change error mode, this should ignore the error and go to the next variable/month.&lt;/P&gt;
&lt;P&gt;Before the rest extract&lt;/P&gt;
&lt;P&gt;Set = errormode = '0';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 11:25:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-handle-quot-NULL-quot-response-in-REST-API-Connector/m-p/2072393#M12293</guid>
      <dc:creator>williejacobs</dc:creator>
      <dc:date>2023-05-17T11:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle "NULL" response in REST API Connector</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-handle-quot-NULL-quot-response-in-REST-API-Connector/m-p/2072482#M12294</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/32900"&gt;@williejacobs&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thank you for the suggestion.&lt;BR /&gt;I didn't know this setting.&lt;/P&gt;
&lt;P&gt;Documentation can be found here for anyone else that comes across this question and is interested:&lt;BR /&gt;&lt;A href="https://help.qlik.com/en-US/sense/February2023/Subsystems/Hub/Content/Sense_Hub/Scripting/ErrorVariables/ErrorMode.htm#:~:text=ErrorMode%20This%20error%20variable%20determines%20what%20action%20is,when%20an%20error%20is%20encountered%20during%20script%20execution." target="_blank"&gt;ErrorMode | Qlik Sense on Windows Help&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I've tried this and now I've managed to download all records from the start because Qlik will ignore the error and keeps running the script until it's finished.&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;I guess you can set the errormode back to 1, the default value, again after this REST API Do...Loop loading script so that if there are any other unforeseen errors the script will fail.&lt;BR /&gt;Am I right?&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;SBN.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 14:45:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-handle-quot-NULL-quot-response-in-REST-API-Connector/m-p/2072482#M12294</guid>
      <dc:creator>SBN</dc:creator>
      <dc:date>2023-05-17T14:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle "NULL" response in REST API Connector</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-handle-quot-NULL-quot-response-in-REST-API-Connector/m-p/2072734#M12298</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/226332"&gt;@SBN&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, you are right.&lt;/P&gt;
&lt;P&gt;Glad I could help.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Willie.&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 06:06:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-handle-quot-NULL-quot-response-in-REST-API-Connector/m-p/2072734#M12298</guid>
      <dc:creator>williejacobs</dc:creator>
      <dc:date>2023-05-18T06:06:52Z</dc:date>
    </item>
  </channel>
</rss>

