Skip to content

Commit

Permalink
update CHANGELOG
Browse files Browse the repository at this point in the history
Signed-off-by: Daniele Ahmed <[email protected]>
  • Loading branch information
82marbag authored and Daniele Ahmed committed Jul 22, 2022
1 parent 4f51dd4 commit b446403
Showing 1 changed file with 100 additions and 4 deletions.
104 changes: 100 additions & 4 deletions CHANGELOG.next.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,121 @@ meta = { "breaking" = true, "tada" = false, "bug" = false }
author = "82marbag"

[[aws-sdk-rust]]
message = "Generate event stream specific error types"
message = """
The type of streaming unions that contain errors is generated without those errors.
Errors in a streaming union `Union` are generated as members of the type `UnionError`.
Taking Transcribe as an example, the `AudioStream` streaming union generates, in the client, both the `AudioStream` type:
```rust
pub enum AudioStream {
AudioEvent(crate::model::AudioEvent),
Unknown,
}
```
and its error type,
```rust
pub struct AudioStreamError {
/// Kind of error that occurred.
pub kind: AudioStreamErrorKind,
/// Additional metadata about the error, including error code, message, and request ID.
pub(crate) meta: aws_smithy_types::Error,
}
```
`AudioStreamErrorKind` contains all error variants for the union.
Before, the generated code looked as:
```rust
pub enum AudioStream {
AudioEvent(crate::model::AudioEvent),
... all error variants,
Unknown,
}
```
"""
references = ["smithy-rs#1157"]
meta = { "breaking" = true, "tada" = false, "bug" = false }
author = "82marbag"

[[aws-sdk-rust]]
message = "EventStreamSender and Receiver use event stream specific error types"
message = """
`aws_smithy_http::event_stream::EventStreamSender` and `aws_smithy_http::event_stream::Receiver` are now generic over `<T, E>`,
where `T` is a streaming union and `E` the union's errors.
This means that event stream errors are now sent as `Err` of the union's error type.
With this example model:
```smithy
@streaming union Event {
throttlingError: ThrottlingError
}
@error("client") structure ThrottlingError {}
```
Before:
```rust
stream! { yield Ok(Event::ThrottlingError ...) }
```
After:
```rust
stream! { yield Err(EventError::ThrottlingError ...) }
```
An example from the SDK is in [transcribe streaming](https://github.com/awslabs/smithy-rs/blob/4f51dd450ea3234a7faf481c6025597f22f03805/aws/sdk/integration-tests/transcribestreaming/tests/test.rs#L80).
"""
references = ["smithy-rs#1157"]
meta = { "breaking" = true, "tada" = false, "bug" = false }
author = "82marbag"

[[smithy-rs]]
message = "Generate event stream specific error types"
message = """
The type of streaming unions that contain errors is generated without those errors.
Errors in a streaming union `Union` are generated as members of the type `UnionError`.
Taking Transcribe as an example, the `AudioStream` streaming union generates, in the client, both the `AudioStream` type:
```rust
pub enum AudioStream {
AudioEvent(crate::model::AudioEvent),
Unknown,
}
```
and its error type,
```rust
pub struct AudioStreamError {
/// Kind of error that occurred.
pub kind: AudioStreamErrorKind,
/// Additional metadata about the error, including error code, message, and request ID.
pub(crate) meta: aws_smithy_types::Error,
}
```
`AudioStreamErrorKind` contains all error variants for the union.
Before, the generated code looked as:
```rust
pub enum AudioStream {
AudioEvent(crate::model::AudioEvent),
... all error variants,
Unknown,
}
```
"""
references = ["smithy-rs#1157"]
meta = { "breaking" = true, "tada" = false, "bug" = false }
author = "82marbag"

[[smithy-rs]]
message = "EventStreamSender and Receiver use event stream specific error types"
message = """
`aws_smithy_http::event_stream::EventStreamSender` and `aws_smithy_http::event_stream::Receiver` are now generic over `<T, E>`,
where `T` is a streaming union and `E` the union's errors.
This means that event stream errors are now sent as `Err` of the union's error type.
With this example model:
```smithy
@streaming union Event {
throttlingError: ThrottlingError
}
@error("client") structure ThrottlingError {}
```
Before:
```rust
stream! { yield Ok(Event::ThrottlingError ...) }
```
After:
```rust
stream! { yield Err(EventError::ThrottlingError ...) }
```
An example from the SDK is in [transcribe streaming](https://github.com/awslabs/smithy-rs/blob/4f51dd450ea3234a7faf481c6025597f22f03805/aws/sdk/integration-tests/transcribestreaming/tests/test.rs#L80).
"""
references = ["smithy-rs#1157"]
meta = { "breaking" = true, "tada" = false, "bug" = false }
author = "82marbag"

0 comments on commit b446403

Please sign in to comment.