-
Notifications
You must be signed in to change notification settings - Fork 113
HttpRequestInvokerImpl swallows Exception that prevents sending the error description to client e.g., for timeout error #298
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
Comments
@msingh00021 Could you throw an |
@oliemansm AbortExecutionException only works when the data fetching process has not started. If, lets say 25% of data is retrieved and request times out then there will be 200 OK response with only data section without any error section in payload |
Converting exceptions thrown from the graphql-java ecosystem into proper GraphQL responses is the responsibility of the graphql-java library. I've done some digging around, and it seems that handling exceptions thrown from instrumentations has been a known issue for a long time already (2017), see graphql-java/graphql-java#460. I've looked into several ways using the current version (16.2) to see if there's a way to recognize that exception being thrown and manipulate the |
@msingh00021 I've implemented something for this after all. Will be part of 11.1.1. Error response will be a status OK and body in line with the exception that was thrown:
|
@oliemansm, Thank you so much! |
Describe the bug
HttpRequestInvokerImpl swallows Exception that prevents sending the error description to client e.g., for timeout error
try {
GraphQLQueryResult result = invoke(invocationInput, request, response).join();
writeResultResponse(invocationInput, result, request, response);
} catch (Exception t) {
writeErrorResponse(t, response);
}
To Reproduce
Steps to reproduce the behavior:
Define a Timeout Instrumentation as follows:
Run a query that times out.
Expected behavior
If request times out then there will be Exception based on timeout and we should be able to let client know that request timed out.
Screenshots

The text was updated successfully, but these errors were encountered: