drhall001

Etags and Intermittent QueryTask Server Errors

Discussion created by drhall001 on Dec 5, 2012
Latest reply on Nov 14, 2013 by ZachLiu
Using jsapi 3.2 and server 10.11, running a simple intersection queryTask on a polygon AGSDynamicService, see below, and it fails half of the time with HTTP 200 and response payload {"error":{"code":400,"message":"Unable to complete operation.","details":[]}}

Has anyone been having a similar problem? Do these Etags make sense? I'm keying in on the Etag strangeness because it seems like I should be getting 304 not modifieds when Etags are available or at least the whole response again -- not errors.

var query = new esri.tasks.Query(),
    queryTask = new esri.tasks.QueryTask(SERVICE_PATH_OPERATIONAL_MAP);

query.geometry = mapPoint;
query.outFields = ["DAC", "MHI", "GEOID10"];
queryTask.execute(query, function (res) {
    //do something
}, function (err) {
    alert(err.message);
});


Here's the series of events:
----------------------------
1. Clear browser cache
2. a. Send request with query
    b. Get 200 response with GOOD answer and Etag 1346882992
3. a. Send request with same query and If-None-Match 1346882992
    b. Get 200 response with ERROR answer and Etag bdb51271
4. a. Send request with same query and If-None-Match bdb51271
    b. Get 200 response with GOOD answer and Etag 1346882992
5. a. Send request with same query and If-None-Match 1346882992
    b. Get 200 response with ERROR answer and Etag bdb51271
6. a. Send request with same query and If-None-Match bdb51271
    b. Get 200 response with GOOD answer and Etag 1346882992
7. a. Send request with same query and If-None-Match 1346882992
    b. Get 200 response with ERROR answer and Etag bdb51271
  
Using wikipedia for how Etags should generally work? http://en.wikipedia.org/wiki/HTTP_ETag

Thanks for your help!

Outcomes