Skip to content
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] ClassCastException in AWS transport error handling #1191

Open
andrewparmet opened this issue Sep 9, 2024 · 0 comments
Open

[BUG] ClassCastException in AWS transport error handling #1191

andrewparmet opened this issue Sep 9, 2024 · 0 comments
Labels
bug Something isn't working untriaged

Comments

@andrewparmet
Copy link
Contributor

What is the bug?

The cast from Throwable to Exception in AwsSdk2Transport misses the case when a Throwable does not extend Error or Exception.

Unfortunately I don't have any other information other than that the class of the casted Throwable is simply Throwable (as opposed to some other inheritor of Throwable that is not Error or Exception).

My guess is that the HC5 transport is also vulnerable to this bug.

How can one reproduce the bug?

So far it's been a one-off.

What is the expected behavior?

Exception handling should not fail!

What is your host/environment?

Linux. OpenSearch 2.12.0.

Do you have any screenshots?

Nope.

Do you have any additional context?

This is part of the error handling code to wrap exceptions whose stack traces are unrelated to the caller due to the fact that the AWS transport is asynchronous.

@andrewparmet andrewparmet added bug Something isn't working untriaged labels Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged
Projects
None yet
Development

No branches or pull requests

1 participant