-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] OpenSearchIndicesClient#getAlias throws UnexpectedJsonEventException when the alias doesn't exist #301
Labels
Comments
This is a good catch. Would you be up for writing a PR to fix this, or at least a failing test? |
szczepanczykd
added a commit
to szczepanczykd/opensearch-java
that referenced
this issue
Mar 7, 2023
…opensearch-project#301) Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>
szczepanczykd
added a commit
to szczepanczykd/opensearch-java
that referenced
this issue
Mar 7, 2023
…mpleEndpoint request (opensearch-project#301) Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>
szczepanczykd
added a commit
to szczepanczykd/opensearch-java
that referenced
this issue
Mar 7, 2023
Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>
szczepanczykd
added a commit
to szczepanczykd/opensearch-java
that referenced
this issue
Mar 7, 2023
…er (opensearch-project#301) Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>
szczepanczykd
added a commit
to szczepanczykd/opensearch-java
that referenced
this issue
Mar 30, 2023
Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>
szczepanczykd
added a commit
to szczepanczykd/opensearch-java
that referenced
this issue
May 10, 2023
…earch-project#301) Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>
VachaShah
pushed a commit
that referenced
this issue
May 10, 2023
…#476) * fix: handle String error deserialization for ErrorCause object (#301) Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com> * update CHANGELOG.md Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com> --------- Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>
szczepanczykd
added a commit
to szczepanczykd/opensearch-java
that referenced
this issue
May 11, 2023
…earch-project#301) (opensearch-project#476) * fix: handle String error deserialization for ErrorCause object (opensearch-project#301) Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com> * update CHANGELOG.md Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com> --------- Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>
VachaShah
pushed a commit
that referenced
this issue
May 11, 2023
The fix should be available in version 2.5.0. For now, You can use a snapshot containing this fix: |
dblock
pushed a commit
that referenced
this issue
May 23, 2023
* fix: handle String error deserialization for ErrorCause object (#301) (#476) * fix: handle String error deserialization for ErrorCause object (#301) Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com> * update CHANGELOG.md Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com> --------- Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com> * fix: change int type to long (#489) * fix: change int type to long Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com> * update CHANGELOG.md Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com> * fix: change totalDataSetSizeInBytes to Long too Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com> * fix: skip removing opensearch-observability index in AfterTest cleanup Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com> --------- Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com> --------- Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>
Fixed in 2.5.0 |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is the bug?
When specifying the name of an alias with
org.opensearch.client.opensearch.indices.GetAliasRequest.Builder#name
and the alias doesn't exist on the server, the client will throw a JSON parsing exception instead of indicating that the alias doesn't exist.How can one reproduce the bug?
Run the following code when the
foo
alias doesn't exist.The client will make the request
GET /_alias/foo
and the server will response with http status 404 and the body{"error":"alias [foo] missing","status":404}
.This causes the client to throw the exception:
What is the expected behavior?
It would return a result that says the alias doesn't exist. I suppose with the current Java client the style is to throw an
OpenSearchException
with status 404.What is your host/environment?
opensearch server 2.3.0
opensearch-java 2.1.0
opensearch-rest-client 2.4.0
The text was updated successfully, but these errors were encountered: