Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphql Use new async handleException method #3090

Merged
merged 11 commits into from
Jan 12, 2024
Prev Previous commit
Next Next commit
remove @nullable annotation and return empty result in SentryDataFetc…
…herExceptionHandler onException
lbloder committed Dec 19, 2023
commit 378e3fdc9c4de74da2f3593820b7cc7757486a4a
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ public CompletableFuture<DataFetcherExceptionHandlerResult> handleException(
}

@SuppressWarnings("deprecation")
public @Nullable DataFetcherExceptionHandlerResult onException(
public DataFetcherExceptionHandlerResult onException(
final @NotNull DataFetcherExceptionHandlerParameters handlerParameters) {
final @Nullable CompletableFuture<DataFetcherExceptionHandlerResult> futureResult =
handleException(handlerParameters);
@@ -58,10 +58,10 @@ public CompletableFuture<DataFetcherExceptionHandlerResult> handleException(
try {
return futureResult.get();
} catch (InterruptedException | ExecutionException e) {
return null;
return DataFetcherExceptionHandlerResult.newResult().build();
}
} else {
return null;
return DataFetcherExceptionHandlerResult.newResult().build();
}
}
}