Skip to content

Commit

Permalink
[2.x-manual-bp][Discover] Fix error handling for ppl jobs API (opense…
Browse files Browse the repository at this point in the history
…arch-project#8771) (opensearch-project#8777)

Backport PR:
opensearch-project#8771

From 8771:
* fix error handling for ppl jobs API



* Changeset file for PR opensearch-project#8771 created/updated

---------

Signed-off-by: Shenoy Pratik <[email protected]>
Co-authored-by: Shenoy Pratik <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 31, 2024
1 parent 1cc5c0f commit 5434201
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/8771.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Fix error handling for ppl jobs API ([#8771](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8771))
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);

Expand Down

0 comments on commit 5434201

Please sign in to comment.