-
Notifications
You must be signed in to change notification settings - Fork 326
GraphQLErrorHandlerFactory does not find ExceptionHandlers #166
Comments
@juriad thanks for the solution but do i miss sth? my handleException got never called. I enabled the graphql servlet property in my application.yml ? UsernameNotFoundException works but if I get a CoercingParseValueException Exception then this method will never called.
even create a custom GraphQLErrorHandler does not work.
|
@Guchelkaben The exception handler is intended for exceptions that occur during execution of queries/mutations, but after the actual parsing. So those "internal" GraphQL handling exceptions are not covered by these. Think that's the reason it does work with your |
@oliemansm thx for your reply. Do you know how I can cover the "internal" GraphQL handling? Because these error messages from the "internal" GraphQL are not very accurate. Therefore I want to override them and assign better messages. Otherwise, our frontend must filter the returned string for explicit words, what kind of strange for me :D Instead I want to set a response code or sth else like bad request 400. |
@Guchelkaben To be able to do this we need to extend the What we could do is to also include the |
@Guchelkaben Could you try this again with 5.4.1-SNAPSHOT? |
How can I integrate 5.4.1-SNAPSHOT into my project? |
Add the snapshot repository. See also https://www.graphql-java-kickstart.com/spring-boot/getting-started/
|
Thx, and then replace the version of graphql-spring-boot-starter to 5.4.1-SNAPSHOT? Because if I do that maven don't download anything 🗡
Error: Could not find artifact com.graphql-java-kickstart:graphql-spring-boot-starter:jar:5.4.1-SNAPSHOT in oss-snapshot-local (http://oss.jfrog.org/artifactory/oss-snapshot-local) -> [Help 1] And at jfrog, there is no dependency like this. @oliemansm Did you upload it? Thanks for your effort! |
@Guchelkaben Apparently snapshots aren't configured properly for this project yet, thought it was sorry. I've released this in the meantime and it has already been confirmed to work now by other developers. |
a method annotated with ExceptionHandler is not found if the bean is a CGLib proxy (e.g. Configuration) or if the method is defined in an ancestor
a bean may not be found in
context.getBean(className)
as the bean can be registered in the application context with a name different from its fully qualified name - this leads to NoSuchBeanDefinitionException and application failureI managed to overcome both issues with:
The text was updated successfully, but these errors were encountered: