Skip to content

Commit 5434201

Browse files
ananzhps48opensearch-changeset-bot[bot]
authored
[2.x-manual-bp][Discover] Fix error handling for ppl jobs API (#8771) (#8777)
Backport PR: #8771 From 8771: * fix error handling for ppl jobs API * Changeset file for PR #8771 created/updated --------- Signed-off-by: Shenoy Pratik <sgguruda@amazon.com> Co-authored-by: Shenoy Pratik <sgguruda@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
1 parent 1cc5c0f commit 5434201

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

changelogs/fragments/8771.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
fix:
2+
- Fix error handling for ppl jobs API ([#8771](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8771))

src/plugins/query_enhancements/server/search/ppl_async_search_strategy.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ export const pplAsyncSearchStrategyProvider = (
5959
} else {
6060
request.params = { queryId: inProgressQueryId };
6161
const queryStatusResponse: any = await pplAsyncJobsFacet.describeQuery(context, request);
62+
63+
if (!queryStatusResponse.success) handleFacetError(queryStatusResponse);
64+
6265
const queryStatus = queryStatusResponse?.data?.status;
6366
logger.info(`pplAsyncSearchStrategy: JOB: ${inProgressQueryId} - STATUS: ${queryStatus}`);
6467

0 commit comments

Comments
 (0)