Select to view content in your preferred language

GeoProcessor submitJob is not triggering error callback, but instead throwing a Type Error

2490
0
12-29-2015 09:24 AM
RobertWinterbottom
Deactivated User

I am having trouble with the Geoprocessor.submitJob function not triggering the error callback when there is an error, instead it throws a TypeError.  I am attaching a screenshot of the issue.

Currently we are using a service proxy to access a service and it occasionally throws errors regarding Invalid Parameters (we opened a ticket with Esri Customer Support on this and they said it was a known bug with those proxies), however, when this happens or when there is an error with the submitJob, I would like to be able to catch it so I can show my users a nice error message, but currently it is not triggering anything I can catch, in either the status callback or the error callback.  Below is the snippet I am using for the submitJob call.

geoprocessor.submitJob(params, function (result) {
  // calls geoprocessor.getResultData here when this works
}, function (status) {
  console.debug(status);
}, function (error) {
  console.log('Something Happened', error);
});

This works most of the time, the problem is that when it fails, it does not trigger the error callback at all or even the status callback, just throws TypeError d is not  function.

Note: I am using 3.15, tried 3.14 and got the same results although I don't remember having this issue in the past.

0 Kudos
0 Replies