Open dbwiddis opened 1 month ago
This will be a breaking change. If some user have code/scripts checking exception returned from delete API , their code will break.
Why not change the client side logic to check the error ?
I am changing the client. But this is an unusual pattern and should be clearly documented as such. MLClient users should not have to look in the code to see that deletion does not follow the same pattern as expected.
Make sense, create a document issue to track this : https://github.com/opensearch-project/documentation-website/issues/7838
What is the bug?
When using the ML Client to delete a model or agent which does not exist, the ActionListener failure path is followed with an
OpenSearchStatusException
with statusNOT_FOUND
.This does not match the pattern for Connectors and OpenSearch document deletion where the a
DeleteResponse
is sent indicating success, but includes aDocWriteResponse.Result.NOT_FOUND
result.How can one reproduce the bug? Steps to reproduce the behavior:
What is the expected behavior?
ActionListener should send onResponse with a
DeleteResponse
with NOT_FOUND result.Suggested FIx
Clearly document "delete" APIs that send
DeleteResponse
which do not follow the usual pattern.