My application uses a Service Feature Table to query our online feature service using a simple where clause. This query has worked for nearly two years, but suddenly we intermittently get the TaskStatusErrored (Message - Invalid Call) (Additional Message - Object failed to load, unable to execute task). This happens about every other call now. I have looked at the service logs and don't see anything either. Again this has worked for years, but suddenly it doesn't. I don't know if it has anything to do with my new Appstudio 5.4 Cloud build Possibly, But everything else seems to work. It returns TaskStatusErrored almost instantly. You can see in my code below where I get the errors. And I can do the same where clause and it works sometimes and not others.
Here is a summary of my code
//Declaration
property ServiceFeatureTable onlineFeatureTable
//This is setup in code
onlineFeatureTable = app.featureTable;
//This is done in code somewhere
onlineQueryID = onlineFeatureTable.queryFeaturesWithFieldOptions(fieldsQueryParameters, Enums.QueryFeatureFieldsLoadAll);
QueryParameters {
id: fieldsQueryParameters
whereClause: code = 'xyz' AND Year = '2022' AND iteration = '2' AND Group = '060'
orderByFields: [
OrderBy {
fieldName: "xyzId"
sortOrder: Enums.SortOrderAscending
}
]
}
Connections {
target: onlineFeatureTable
function onQueryFeaturesStatusChanged() {
if (onlineFeatureTable.queryFeaturesStatus === Enums.TaskStatusCompleted) {
processQueryFeaturesResult(onlineFeatureTable.queryFeaturesResult);
}
else if (onlineFeatureTable.queryFeaturesStatus === Enums.TaskStatusErrored){
//It reaches this error about every other one now?
console.log("Error querying features: ", onlineFeatureTable.queryFeaturesResult);
console.log("onlineFeatureTable.error.message - ", onlineFeatureTable.error.message + "\n" + "\n");
console.log("EonlineFeatureTable.error.additionalMessage - ", onlineFeatureTable.error.additionalMessage + "\n" + "\n");
console.log("onlineFeatureTable.error.domain - ", onlineFeatureTable.error.domain + "\n" + "\n");
console.log("onlineFeatureTable.error.errorType - ", onlineFeatureTable.error.errorType + "\n" + "\n");
console.log("onlineFeatureTable.error.extendedErrorType - ", onlineFeatureTable.error.extendedErrorType + "\n" + "\n");
}
else if (onlineFeatureTable.queryFeaturesStatus === Enums.TaskStatusInProgress){
console.log("TaskStatusInProgress - ", onlineFeatureTable.queryFeaturesStatus);
}
else
{
console.log("onlineFeatureTable - onQueryFeaturesStatusChanged Other - ", onlineFeatureTable.queryFeaturesStatus);
}
}
}