{"action":"created","issue":{"url":"https://api.github.com/repos/graphql-java-kickstart/graphql-spring-boot/issues/166","repository_url":"https://api.github.com/repos/graphql-java-kickstart/graphql-spring-boot","labels_url":"https://api.github.com/repos/graphql-java-kickstart/graphql-spring-boot/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/graphql-java-kickstart/graphql-spring-boot/issues/166/comments","events_url":"https://api.github.com/repos/graphql-java-kickstart/graphql-spring-boot/issues/166/events","html_url":"https://github.com/graphql-java-kickstart/graphql-spring-boot/issues/166","id":385917975,"node_id":"MDU6SXNzdWUzODU5MTc5NzU=","number":166,"title":"GraphQLErrorHandlerFactory does not find ExceptionHandlers","user":{"login":"juriad","id":886346,"node_id":"MDQ6VXNlcjg4NjM0Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/886346?v=4","gravatar_id":"","url":"https://api.github.com/users/juriad","html_url":"https://github.com/juriad","followers_url":"https://api.github.com/users/juriad/followers","following_url":"https://api.github.com/users/juriad/following{/other_user}","gists_url":"https://api.github.com/users/juriad/gists{/gist_id}","starred_url":"https://api.github.com/users/juriad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juriad/subscriptions","organizations_url":"https://api.github.com/users/juriad/orgs","repos_url":"https://api.github.com/users/juriad/repos","events_url":"https://api.github.com/users/juriad/events{/privacy}","received_events_url":"https://api.github.com/users/juriad/received_events","type":"User","site_admin":false},"labels":[{"id":563423062,"node_id":"MDU6TGFiZWw1NjM0MjMwNjI=","url":"https://api.github.com/repos/graphql-java-kickstart/graphql-spring-boot/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-29T20:43:23Z","updated_at":"2018-12-11T19:06:30Z","closed_at":null,"author_association":"NONE","body":"1) 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\r\n\r\n2) 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 failure\r\n\r\nI managed to overcome both issues with:\r\n```\r\n@Component(\"com.company.x360.ExceptionHandlers\")\r\nclass ExceptionHandlers {\r\n\r\n    @ExceptionHandler(Throwable::class)\r\n    fun handleException(e: Throwable): GraphQLError {\r\n```"},"comment":{"url":"https://api.github.com/repos/graphql-java-kickstart/graphql-spring-boot/issues/comments/446322637","html_url":"https://github.com/graphql-java-kickstart/graphql-spring-boot/issues/166#issuecomment-446322637","issue_url":"https://api.github.com/repos/graphql-java-kickstart/graphql-spring-boot/issues/166","id":446322637,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjMyMjYzNw==","user":{"login":"oliemansm","id":13518144,"node_id":"MDQ6VXNlcjEzNTE4MTQ0","avatar_url":"https://avatars2.githubusercontent.com/u/13518144?v=4","gravatar_id":"","url":"https://api.github.com/users/oliemansm","html_url":"https://github.com/oliemansm","followers_url":"https://api.github.com/users/oliemansm/followers","following_url":"https://api.github.com/users/oliemansm/following{/other_user}","gists_url":"https://api.github.com/users/oliemansm/gists{/gist_id}","starred_url":"https://api.github.com/users/oliemansm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliemansm/subscriptions","organizations_url":"https://api.github.com/users/oliemansm/orgs","repos_url":"https://api.github.com/users/oliemansm/repos","events_url":"https://api.github.com/users/oliemansm/events{/privacy}","received_events_url":"https://api.github.com/users/oliemansm/received_events","type":"User","site_admin":false},"created_at":"2018-12-11T19:06:30Z","updated_at":"2018-12-11T19:06:30Z","author_association":"MEMBER","body":"@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 `UsernameNotFoundException`, but it doesn't with the `CoercingParseValueException`."}}
{"actor":{"display_login":"oliemansm"}}