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

Update javadoc regarding exception handling in async clients #5089

Merged
merged 2 commits into from
Apr 10, 2024

Conversation

zoewangg
Copy link
Contributor

@zoewangg zoewangg commented Apr 9, 2024

Motivation and Context

The exception returned by the SDK client is wrapped with CompletionException see below. We can't change it due to backwards compatibility reasons, so we are updating this doc to mention this behavior.

public static void main(String[] args) {
    var sqs = SqsAsyncClient.create();
    sqs.getQueueUrl(GetQueueUrlRequest.builder().queueName("invalidqueuename").build())
        .whenComplete((url, e) -> {
            System.out.println("Exception: " + e);
        })
        .join();
}

prints out

Exception: java.util.concurrent.CompletionException: software.amazon.awssdk.services.sqs.model.QueueDoesNotExistException: 
The specified queue does not exist for this wsdl version. (Service: Sqs, Status Code: 400, Request ID: xxxx)

Modifications

Update documentation

@zoewangg zoewangg requested a review from a team as a code owner April 9, 2024 22:45
@zoewangg zoewangg enabled auto-merge (squash) April 9, 2024 23:19
Copy link

sonarqubecloud bot commented Apr 9, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@zoewangg zoewangg merged commit 61e555b into master Apr 10, 2024
17 checks passed
akidambisrinivasan pushed a commit to akidambisrinivasan/aws-sdk-java-v2 that referenced this pull request Jun 28, 2024
* Update javadoc regarding exception handling in async clients

* Fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants