You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of manually writing this serialization code, we should model these errors as Smithy structure shapes with the @error trait, adjoin them automatically to all models, and leverage the code-generated serializers. This is the approach that smithy-typescript uses.
This has the advantage of reducing the amount of code that we need to maintain, and reducing possible bugs introduced in the manual implementations that don't honor the protocol specifications.
The text was updated successfully, but these errors were encountered:
We're currently serializing server framework-level errors manually. We're doing this for each protocol. For example, for
restJson1
:smithy-rs/rust-runtime/aws-smithy-http-server/src/protocol/rest_json_1/runtime_error.rs
Lines 92 to 108 in b748878
Instead of manually writing this serialization code, we should model these errors as Smithy structure shapes with the
@error
trait, adjoin them automatically to all models, and leverage the code-generated serializers. This is the approach that smithy-typescript uses.This has the advantage of reducing the amount of code that we need to maintain, and reducing possible bugs introduced in the manual implementations that don't honor the protocol specifications.
The text was updated successfully, but these errors were encountered: