aws / aws/aws-sdk-java-v2

aws-crt s3 getObject throws S3Exception(Status Code: 404) instead of NoSuchKeyException

Open
#4,231 6 comments 0 reactions 0 assignees View on GitHub
bug crt-client p2
Dominant language
Java
Stars
2.6k
Forks
1k
Avg merge
2d 9h
Merged PRs (30d)
51

Description

### Describe the bug

software.amazon.awssdk.services.s3.model.S3Exception: null (Service: S3, Status Code: 404, Request ID: G082PGJQPQ3KQC3K, Extended Request ID: YAiJeukQU3Jo5fm8mqr+wR4Av0u0SQ5ehIRztuKLNuGADdFRMA/tkpsyyP/RleOTG+/FxgqYUqY=)

### Expected Behavior

Expected to get a `NoSuchKeyException`.

### Current Behavior

Getting a `S3Exception(Status Code: 404)`.

### Reproduction Steps

try (var s3AsyncClient = S3AsyncClient.crtCreate()) {
s3AsyncClient.getObject(request -> request.bucket("bucket").key("key"), AsyncResponseTransformer.toBytes()).join();
}

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### AWS Java SDK version used

2.20.110 and aws-crt of 0.23.2

### JDK version used

$ java -version openjdk version "17.0.2" 2022-01-18 OpenJDK Runtime Environment (build 17.0.2+8-86) OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing)

### Operating System and version

macOS 13.4.1 (c) (22F770820d)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.