<?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 Detect timeout in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detect-timeout/m-p/696171#M64821</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi There,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a code snippet that fires the ArcGIS printTask(). Most of the times everything works like a charm. But once a while, it results in a 504 (timeout). Unfortunately, the prinTask() doesn't fire the regular the regular error function the, So i'm looking for a way to detect the occurrence of the 504. Or if anyone knows how to prevent it from occurring at all, that would be most wonderful. But since I doubt if that's possible, let's narrow the question down to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How to detect the prinTask() resulting in a 504 error, so we could show an notification to the user?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's the snippet, a screenshot of the 504 in the console is also attached:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[HTML]//The if/else below is needed to prevent IE caching problem&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if (graphicsLayer.loaded) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; printTask.execute(params, printResult, printError);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}else {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; dojo.connect(map, "onUpdateEnd", function(){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printTask.execute(params, printResult, printError);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}[/HTML]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[HTML]function printError(errorDetails){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;$('#progressMessages ul li#progress').html('&amp;lt;strong&amp;gt;Fout opgetreden&amp;lt;/strong&amp;gt; tijdens stap. Wanneer u dit probleem meerdere keren ervaart vragen wij u de beheerder op de hoogte te stellen via de \'feedback\' knop links en de volgende error details te vermelden: &amp;lt;br/&amp;gt;&amp;lt;strong&amp;gt;Error details&amp;lt;/strong&amp;gt;: '+errorDetails).removeClass('progressBusy').addClass('progressFailed');&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }[/HTML]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]30863[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 26 Jan 2014 08:58:37 GMT</pubDate>
    <dc:creator>DennisHunink</dc:creator>
    <dc:date>2014-01-26T08:58:37Z</dc:date>
    <item>
      <title>Detect timeout</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detect-timeout/m-p/696171#M64821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi There,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a code snippet that fires the ArcGIS printTask(). Most of the times everything works like a charm. But once a while, it results in a 504 (timeout). Unfortunately, the prinTask() doesn't fire the regular the regular error function the, So i'm looking for a way to detect the occurrence of the 504. Or if anyone knows how to prevent it from occurring at all, that would be most wonderful. But since I doubt if that's possible, let's narrow the question down to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How to detect the prinTask() resulting in a 504 error, so we could show an notification to the user?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's the snippet, a screenshot of the 504 in the console is also attached:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[HTML]//The if/else below is needed to prevent IE caching problem&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if (graphicsLayer.loaded) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; printTask.execute(params, printResult, printError);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}else {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; dojo.connect(map, "onUpdateEnd", function(){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printTask.execute(params, printResult, printError);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}[/HTML]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[HTML]function printError(errorDetails){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;$('#progressMessages ul li#progress').html('&amp;lt;strong&amp;gt;Fout opgetreden&amp;lt;/strong&amp;gt; tijdens stap. Wanneer u dit probleem meerdere keren ervaart vragen wij u de beheerder op de hoogte te stellen via de \'feedback\' knop links en de volgende error details te vermelden: &amp;lt;br/&amp;gt;&amp;lt;strong&amp;gt;Error details&amp;lt;/strong&amp;gt;: '+errorDetails).removeClass('progressBusy').addClass('progressFailed');&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }[/HTML]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]30863[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Jan 2014 08:58:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detect-timeout/m-p/696171#M64821</guid>
      <dc:creator>DennisHunink</dc:creator>
      <dc:date>2014-01-26T08:58:37Z</dc:date>
    </item>
  </channel>
</rss>

