esri.request is delaying sending an error callback with KML file

584
2
Jump to solution
10-01-2013 06:21 PM
StephenLead
Regular Contributor III
See the sample script at http://jsfiddle.net/slead/Lgbkm/3/ where I'm using esri.request to make an AJAX call to a KML file.

This call fails (I need to pass it via http://utility.arcgis.com/sharing/kml?url=) but that's not the issue. The problem is that the error callback isn't called for nearly a minute.

It should return an "error" popup but there's a long delay before it appears. If I use
url: "adsfdsaf",
the error is thrown immediately.

This isn't a pressing issue as I have a workaround (use the utility method if the URL contains ".kml" but I'm curious as to why this is occurring.

Thanks,
Steve
0 Kudos
1 Solution

Accepted Solutions
KellyHutchins
Esri Frequent Contributor
esri.request has a timeout option that lets you reduce the default timeout period. The default timeout is about 1 minute.

https://developers.arcgis.com/en/javascript/jsapi/namespace_esri-amd.html#request

View solution in original post

0 Kudos
2 Replies
KellyHutchins
Esri Frequent Contributor
esri.request has a timeout option that lets you reduce the default timeout period. The default timeout is about 1 minute.

https://developers.arcgis.com/en/javascript/jsapi/namespace_esri-amd.html#request
0 Kudos
StephenLead
Regular Contributor III
Thanks Kelly
0 Kudos