From 779303a2f7e49f4d40e697082131ad16ecfeb4fb Mon Sep 17 00:00:00 2001 From: simon987 Date: Thu, 14 Apr 2022 16:24:56 -0400 Subject: [PATCH] Print body response when task id cannot be read --- src/index/elastic.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index/elastic.c b/src/index/elastic.c index bb22321..c2a723d 100644 --- a/src/index/elastic.c +++ b/src/index/elastic.c @@ -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); }