From df476000a3d4c9a8b8201780d9f6866c0a659d00 Mon Sep 17 00:00:00 2001 From: Shenoy Pratik Date: Wed, 30 Oct 2024 16:36:08 -0700 Subject: [PATCH 1/2] fix error handling for ppl jobs API Signed-off-by: Shenoy Pratik --- .../server/search/ppl_async_search_strategy.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/query_enhancements/server/search/ppl_async_search_strategy.ts b/src/plugins/query_enhancements/server/search/ppl_async_search_strategy.ts index 9ac010b204c0..ede0d51b62c7 100644 --- a/src/plugins/query_enhancements/server/search/ppl_async_search_strategy.ts +++ b/src/plugins/query_enhancements/server/search/ppl_async_search_strategy.ts @@ -59,6 +59,9 @@ export const pplAsyncSearchStrategyProvider = ( } else { request.params = { queryId: inProgressQueryId }; const queryStatusResponse: any = await pplAsyncJobsFacet.describeQuery(context, request); + + if (!queryStatusResponse.success) handleFacetError(queryStatusResponse); + const queryStatus = queryStatusResponse?.data?.status; logger.info(`pplAsyncSearchStrategy: JOB: ${inProgressQueryId} - STATUS: ${queryStatus}`); From 00c93f1c9164ceb7bdbb369037ea1f4c10afe56b Mon Sep 17 00:00:00 2001 From: "opensearch-changeset-bot[bot]" <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 23:38:58 +0000 Subject: [PATCH 2/2] Changeset file for PR #8771 created/updated --- changelogs/fragments/8771.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/8771.yml diff --git a/changelogs/fragments/8771.yml b/changelogs/fragments/8771.yml new file mode 100644 index 000000000000..f923975aface --- /dev/null +++ b/changelogs/fragments/8771.yml @@ -0,0 +1,2 @@ +fix: +- Fix error handling for ppl jobs API ([#8771](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8771)) \ No newline at end of file