Skip to content
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

documentation: error handling example is outdated for currentl graphql-java version #1832

Open
Patrickkooijman opened this issue Mar 5, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@Patrickkooijman
Copy link

Patrickkooijman commented Mar 5, 2024

What are you missing in the docs

The error-handling page shows an example which ends with a delegate call to handle other exceptions then MyException.`

return DataFetcherExceptionHandler.super.handleException(handlerParameters);

This default method was however deprecated and is removed in graphql-java 21.3, graphql-java/graphql-java@1021219

@Patrickkooijman Patrickkooijman added the documentation Improvements or additions to documentation label Mar 5, 2024
@paulbakker paulbakker changed the title documentation: error handling example is outdated for Java 21 documentation: error handling example is outdated for currentl graphql-java version Mar 5, 2024
@paulbakker
Copy link
Collaborator

Updated the title to reflect it's about the graphql-java version, not Java itself.

Thanks for reporting @Patrickkooijman, we missed that.

@awesor
Copy link

awesor commented Apr 9, 2024

Out of curiosity for someone who found this issue as they were upgrading versions and has a reference to that exact line of code in their codebase that's causing strife, what is the recommended line of code here (until of course the docs are updated) for a default handling of exceptions? Should we just not have a default case?

Thanks again @Patrickkooijman for reporting this!

@ChristopherGustafson
Copy link

I solved this by creating an instance of SimpleDataFetcherExceptionHandler myself, and then calling simpleDataFetcherExceptionHandler.handleException() instead of super.handleException(). Similar to how the initial implementation looked like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants