-
Notifications
You must be signed in to change notification settings - Fork 295
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: GraphQLJavaErrorInstrumentation changes error type of DataFetchingException #1932
Comments
Hi @hpuac, thank you for the feedback and report. To make sure I'm understanding: the use case is, in the case of a customized |
Hello, I replicated the behavior via this datafetcher, let me know if it's a different case:
In the linked PR, the goal was to make error reporting more consistent in the framework and it closed a gap that was there previously, which is where your bug report comes in. |
Hi @kailyak, Referring to the snippet shared in the original issue message: Lines 56 to 57 in f9382bf
I believe the dgs-framework/graphql-error-types/src/main/java/com/netflix/graphql/types/errors/ErrorDetail.java Line 151 in 8dd6966
Is this the expected behaviour for all |
Hey folks, I'd like to report a change in behavior that I currently consider a bug. It was introduced in 8.6.0 with this PR: #1905.
Please let me know your opinion on this topic 🙂
Expected behavior
When returning a
DataFetcherResult
containing aGraphQLError
I'm expecting my error to be propagated to the client, including my givencode
anderrorType
.Actual behavior
The
GraphQLJavaErrorInstrumentation
is creating a newTypedGraphQLError
and overriding theerrorType
.The
code
is kept but theerrorType
is overridden.See
dgs-framework/graphql-dgs/src/main/kotlin/com/netflix/graphql/dgs/internal/GraphQLJavaErrorInstrumentation.kt
Lines 53 to 57 in f9382bf
Steps to reproduce
Return a
DataFetcherResult
that contains a customGraphQLError
.Let me know in case you would like to see a demo project.
The text was updated successfully, but these errors were encountered: