Skip to content

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

Open
@faucct

Description

@faucct

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.crt-clientp2This is a standard priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions