For example if I have this code:
public class StackTraceTest {
@Autowired
private Client elasticClient;
public void blowUp(){
elasticClient.prepareSearch("index_that_does_not_exist").get();
}
}
The resulting IndexNotFoundException will not include StackTraceTest anywhere in it's stack trace (It looks like the elastic java client is doing some stack trace manipulation behind the scenes).
Is there a way to configure things so that my code will be included in the stack trace?
Right now my work around is going to be to wrap my calls to the elasticClient with a try catch that throws my own exception with the elastic exception as it's cause. This will work, but I'm wondering if there's a more graceful / less cumbersome solution.