Return 409 for PUT index when index exists#22354
Conversation
f9d55d3 to
d378fb8
Compare
PUT <index> returned HTTP 400 for resource_already_exists_exception. Map ResourceAlreadyExistsException to RestStatus.CONFLICT (409). Fixes opensearch-project#20072 Signed-off-by: MdTanwer <tanW9004167@gmail.com>
d378fb8 to
06c6e7e
Compare
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #22354 +/- ##
=========================================
Coverage 73.40% 73.41%
- Complexity 76075 76111 +36
=========================================
Files 6076 6076
Lines 345500 345500
Branches 49732 49732
=========================================
+ Hits 253608 253638 +30
+ Misses 71707 71635 -72
- Partials 20185 20227 +42 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
PUT <index>is called for an index that already existsResourceAlreadyExistsExceptiontoRestStatus.CONFLICTFixes #20072