diff --git a/codegen/src/main/java/software/amazon/awssdk/codegen/docs/DocumentationBuilder.java b/codegen/src/main/java/software/amazon/awssdk/codegen/docs/DocumentationBuilder.java index 8e91c2493f7d..ea98967d01f5 100644 --- a/codegen/src/main/java/software/amazon/awssdk/codegen/docs/DocumentationBuilder.java +++ b/codegen/src/main/java/software/amazon/awssdk/codegen/docs/DocumentationBuilder.java @@ -33,7 +33,9 @@ public final class DocumentationBuilder { // TODO This prefix is not suitable for paginated operations. Either remove it for paginated operations // or change the statement to something generic private static final String ASYNC_THROWS_PREFIX = "The CompletableFuture returned by this method can be completed " + - "exceptionally with the following exceptions."; + "exceptionally with the following exceptions. The exception returned is " + + "wrapped with CompletionException, so you need to invoke {@link " + + "Throwable#getCause} to retrieve the underlying exception."; private String desc; private List> params = new ArrayList<>(); diff --git a/codegen/src/test/java/software/amazon/awssdk/codegen/model/intermediate/DocumentationBuilderTest.java b/codegen/src/test/java/software/amazon/awssdk/codegen/model/intermediate/DocumentationBuilderTest.java index ad83e3bb5264..7bc9cd8dbe0b 100644 --- a/codegen/src/test/java/software/amazon/awssdk/codegen/model/intermediate/DocumentationBuilderTest.java +++ b/codegen/src/test/java/software/amazon/awssdk/codegen/model/intermediate/DocumentationBuilderTest.java @@ -67,7 +67,9 @@ public void asyncReturns_FormatsExceptionsInUnorderedList() { "\n" + "@param paramOne param one docs\n" + "@return CompletableFuture of success
\n" + - "The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.\n" + + "The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. " + + "The exception returned is wrapped with CompletionException, " + + "so you need to invoke {@link Throwable#getCause} to retrieve the underlying exception.\n" + "