Skip to content

Add isIndexNotFoundException utility to AlertingException#934

Merged
riysaxen-amzn merged 2 commits intoopensearch-project:mainfrom
manaswini1920:feature/sdk-index-not-found-util-main
Apr 9, 2026
Merged

Add isIndexNotFoundException utility to AlertingException#934
riysaxen-amzn merged 2 commits intoopensearch-project:mainfrom
manaswini1920:feature/sdk-index-not-found-util-main

Conversation

@manaswini1920
Copy link
Copy Markdown
Contributor

Description:

Cherry-pick of #933 (merged to remote-metadata-support) to main. Adds AlertingException.isIndexNotFoundException() that walks the exception cause chain to detect IndexNotFoundException. The remote metadata SDK wraps IndexNotFoundException inside
OpenSearchStatusException, so callers checking e.message directly miss it. Needed by the alerting plugin's SDK migration.

Related Issues:

Part of alerting SDK migration: opensearch-project/alerting#2088

Check List:

  • Commits are signed per the DCO using --signoff.

Walks the exception cause chain to detect IndexNotFoundException.
Needed for SDK migration where exceptions are wrapped.

Signed-off-by: Manaswini Ragamouni <ragamanu@amazon.com>
eirsep
eirsep previously approved these changes Apr 9, 2026
engechas
engechas previously approved these changes Apr 9, 2026
@manaswini1920 manaswini1920 dismissed stale reviews from engechas and eirsep via 6601660 April 9, 2026 18:13
Update test assertions from com.fasterxml.jackson.core.JsonParseException
to org.opensearch.tools.jackson.core.JsonParseException to match the
Jackson repackaging in OpenSearch core.

Signed-off-by: Manaswini Ragamouni <ragamanu@amazon.com>
@manaswini1920 manaswini1920 force-pushed the feature/sdk-index-not-found-util-main branch from 6601660 to 49ada8d Compare April 9, 2026 18:24
@riysaxen-amzn riysaxen-amzn merged commit 1fd82b4 into opensearch-project:main Apr 9, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants