Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,20 @@ public DataFetcherExceptionHandlerResult onException(DataFetcherExceptionHandler
ResultPath path = handlerParameters.getPath();

ExceptionWhileDataFetching error = new ExceptionWhileDataFetching(path, exception, sourceLocation);
logNotSafe.warn(error.getMessage(), exception);
logException(error, exception);

return DataFetcherExceptionHandlerResult.newResult().error(error).build();
}

/**
* Called to log the exception - a subclass could choose to something different in logging terms
* @param error the graphql error
* @param exception the exception that happened
*/
protected void logException(ExceptionWhileDataFetching error, Throwable exception) {
logNotSafe.warn(error.getMessage(), exception);
}

/**
* Called to unwrap an exception to a more suitable cause if required.
*
Expand Down