Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] Fix resolve index API to not throw 500 when encountering `…
…no_such_remote_cluster_exception` (#204802) (#205016) # Backport This will backport the following commits from `main` to `8.x`: - [Fix resolve index API to not throw 500 when encountering `no_such_remote_cluster_exception` (#204802)](#204802) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Lukas Olson","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-19T21:55:29Z","message":"Fix resolve index API to not throw 500 when encountering `no_such_remote_cluster_exception` (#204802)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/197747.\r\n\r\nUpdates the `/internal/index-pattern-management/resolve_index/{query}`\r\nroute to properly handle `no_such_remote_cluster_exception` and return\r\n`404` rather than `500` server error.\r\n\r\nAdds unit tests for the route handler.\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Julia Rechkunova <[email protected]>","sha":"0952f6e0f52771b3503c9ddd2afd793d8ed86709","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Data Views","release_note:skip","v9.0.0","Team:DataDiscovery","backport:prev-minor"],"title":"Fix resolve index API to not throw 500 when encountering `no_such_remote_cluster_exception`","number":204802,"url":"https://github.com/elastic/kibana/pull/204802","mergeCommit":{"message":"Fix resolve index API to not throw 500 when encountering `no_such_remote_cluster_exception` (#204802)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/197747.\r\n\r\nUpdates the `/internal/index-pattern-management/resolve_index/{query}`\r\nroute to properly handle `no_such_remote_cluster_exception` and return\r\n`404` rather than `500` server error.\r\n\r\nAdds unit tests for the route handler.\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Julia Rechkunova <[email protected]>","sha":"0952f6e0f52771b3503c9ddd2afd793d8ed86709"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204802","number":204802,"mergeCommit":{"message":"Fix resolve index API to not throw 500 when encountering `no_such_remote_cluster_exception` (#204802)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/197747.\r\n\r\nUpdates the `/internal/index-pattern-management/resolve_index/{query}`\r\nroute to properly handle `no_such_remote_cluster_exception` and return\r\n`404` rather than `500` server error.\r\n\r\nAdds unit tests for the route handler.\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Julia Rechkunova <[email protected]>","sha":"0952f6e0f52771b3503c9ddd2afd793d8ed86709"}}]}] BACKPORT--> Co-authored-by: Lukas Olson <[email protected]>
- Loading branch information