Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit 97f5170

Browse files
committed
Improved check if custom error handler exists (fix #177)
1 parent fbad608 commit 97f5170

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphql-spring-boot-autoconfigure/src/main/java/com/oembedler/moon/graphql/boot/GraphQLWebAutoConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public class GraphQLWebAutoConfiguration implements ApplicationContextAware {
113113

114114
@Override
115115
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
116-
if (errorHandler != null) {
116+
if (errorHandler == null) {
117117
ConfigurableApplicationContext context = (ConfigurableApplicationContext) applicationContext;
118118
errorHandler = new GraphQLErrorHandlerFactory().create(context, graphQLServletProperties.isExceptionHandlersEnabled());
119119
context.getBeanFactory().registerSingleton(errorHandler.getClass().getCanonicalName(), errorHandler);

0 commit comments

Comments
 (0)