-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clarify that event streams contain modeled errors
- Loading branch information
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
28 changes: 28 additions & 0 deletions
28
...ources/software/amazon/smithy/model/errorfiles/validators/event-stream-with-errors.smithy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
namespace smithy.example | ||
|
||
operation SubscribeToMovements { | ||
output: SubscribeToMovementsOutput | ||
} | ||
|
||
structure SubscribeToMovementsOutput { | ||
movements: MovementEvents, | ||
} | ||
|
||
@streaming | ||
union MovementEvents { | ||
up: Movement, | ||
down: Movement, | ||
left: Movement, | ||
right: Movement, | ||
throttlingError: ThrottlingError | ||
} | ||
|
||
structure Movement { | ||
velocity: Float, | ||
} | ||
|
||
/// An example error emitted when the client is throttled | ||
/// and should terminate the event stream. | ||
@error("client") | ||
@retryable(throttling: true) | ||
structure ThrottlingError {} |