File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed
examples/osgi/apache-karaf-feature
src/main/java/graphql/servlet/core Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 1313 <packaging >feature</packaging >
1414
1515 <properties >
16- <jackson .version>2.9.8 </jackson .version>
16+ <jackson .version>2.9.9 </jackson .version>
1717 </properties >
1818
1919
Original file line number Diff line number Diff line change @@ -26,20 +26,22 @@ public List<GraphQLError> processErrors(List<GraphQLError> errors) {
2626
2727 errors .stream ()
2828 .filter (error -> !isClientError (error ))
29- .forEach (error -> {
30- if (error instanceof Throwable ) {
31- log .error ("Error executing query!" , (Throwable ) error );
32- } else if (error instanceof ExceptionWhileDataFetching ) {
33- log .error ("Error executing query {}" , error .getMessage (), ((ExceptionWhileDataFetching ) error ).getException ());
34- } else {
35- log .error ("Error executing query ({}): {}" , error .getClass ().getSimpleName (), error .getMessage ());
36- }
37- });
29+ .forEach (this ::logError );
3830 }
3931
4032 return clientErrors ;
4133 }
4234
35+ protected void logError (GraphQLError error ) {
36+ if (error instanceof Throwable ) {
37+ log .error ("Error executing query!" , (Throwable ) error );
38+ } else if (error instanceof ExceptionWhileDataFetching ) {
39+ log .error ("Error executing query {}" , error .getMessage (), ((ExceptionWhileDataFetching ) error ).getException ());
40+ } else {
41+ log .error ("Error executing query ({}): {}" , error .getClass ().getSimpleName (), error .getMessage ());
42+ }
43+ }
44+
4345 protected List <GraphQLError > filterGraphQLErrors (List <GraphQLError > errors ) {
4446 return errors .stream ()
4547 .filter (this ::isClientError )
You can’t perform that action at this time.
0 commit comments