Replies: 1 comment
-
classification is not part of the spec - the graphql-java team chose to do this because the spec is very thin on errors and we felt this would do good than harm. There is no switch to disable this behavior. You would need to post process the map and kill the attributes manually The code that does this for the record is |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When generating this error on a custom DataFetcher class:
dataFetcherResult.error( GraphQLError.newError().message("custom error") .location( SourceLocation(37, 9) ).path(ResultPath.parse(" /test[0]/test2")).extensions(null).build() )
I noticed that the JSON generated have extensions and classification:
{"errors":[{"message":"custom error","locations":[{"line":37,"column":9}],"path":["test",0,"test2"],"extensions":{"classification":"DataFetchingException"}}],"data":{"test":[]}}
Why do we have a classification section here? Is this part of the spec? How can I disable the whole extensions from appearing in this case?
Testing using v24.1
Beta Was this translation helpful? Give feedback.
All reactions