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] Synchronous calls with async transport should preserve caller stack trace #653

Closed
andrewparmet opened this issue Oct 4, 2023 · 2 comments · Fixed by #656
Closed
Labels
bug Something isn't working

Comments

@andrewparmet
Copy link
Contributor

What is the bug?

When an OpenSearchClient built with async transport fails, the transports unwrap causes and propagate them if they're RuntimeExceptions. We lose the stack trace since the exception originated in some pooled thread. Can these exceptions instead be re-wrapped in an IOException and propagated as the interface allows?

As it stands I just wrap the existing transport with one that catches and wraps this way, so it's not the end of the world, but it was confusing that we got random stack traces from a "synchronous" call.

@andrewparmet andrewparmet added bug Something isn't working untriaged labels Oct 4, 2023
@dblock
Copy link
Member

dblock commented Oct 5, 2023

That's a good find! Care to fix/contribute, even starting with a test that demonstrates the issue?

@andrewparmet
Copy link
Contributor Author

Sure - here's a first go: #656

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants