Print body response when task id cannot be read

This commit is contained in:
simon987 2022-04-14 16:24:56 -04:00
parent 23aee14c07
commit 779303a2f7

View File

@ -139,6 +139,11 @@ void execute_update_script(const char *script, int async, const char index_id[SI
if (async) {
cJSON *task = cJSON_GetObjectItem(resp, "task");
if (task == NULL) {
LOG_FATALF("elastic.c", "FIXME: Could not get task id: %s", r->body);
}
LOG_INFOF("elastic.c", "User script queued: %s/_tasks/%s", Indexer->es_url, task->valuestring);
}