awslabs / awslabs/aws-sdk-rust

`SdkBody` should always get re-exported

Open
#893 0 comments 0 reactions 0 assignees View on GitHub
feature-request p2
Dominant language
Rust
Stars
3.3k
Forks
290
Avg merge
1d 12h
Merged PRs (30d)
3

Description

Currently, `SdkBody` is re-exported in services that have streaming, such as S3. However, services such as DynamoDB do not re-export it.

`SdkBody` is needed when writing any unit test that creates a `SdkError` since it has a raw response in it. For example:
```rust
SdkError::service_error(
PutItemError::ConditionalCheckFailedException(
ConditionalCheckFailedException::builder().build(),
),
http::Response::builder()
.status(some_status)
.body(SdkBody::empty()) // <-- here
.unwrap(),
)
```

Contributor guide

Open the contributing guide

Research direction

Inspect how SdkBody is re-exported by streaming services such as S3, then compare the public exports for a non-streaming service such as DynamoDB. Apply the same export behavior to services that currently omit it, and verify that the shown SdkError test pattern can use SdkBody::empty().

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.