Closed
Description
Describe the bug
on servlet async mode, uncatched exception throwed from graphql.kickstart.servlet.HttpRequestInvokerImpl.invoke()
will "hang" the main thread, till servlet timeout.
To Reproduce
- construct a bad data input to let graphql validation failed. in other words, construct any uncatched exception throwed from
graphql.kickstart.servlet.HttpRequestInvokerImpl.invoke()
- we will see the error printed on console immediately
- client get the data till servlet timeout. and the error msg is about timeout not the exception we made.
Expected behavior
client get the precise exception information immediately.
Version:
- graphql.java 17.3
- graphql.java.kickstart.servlet 12.0.0
Additional context
maybe some code like this
configuration
.getAsyncExecutor()
.execute(
() -> {
try{
FutureExecutionResult futureResult = invoke(invocationInput, request, response);
futureHolder.set(futureResult);
handle(futureResult, request, response, listenerHandler)
.thenAccept(it -> asyncContext.complete());
}catch(Exception){
// write result & apply RequestCallback ...
}
});