-
Notifications
You must be signed in to change notification settings - Fork 237
Description
Context
CI in #4399 is currently blocked due to certain protocol tests that don't have ValidationException in the error closure when the server expects it.
smithy-lang/smithy#2861 was closed due to it being a difference in the spec implementation with the Rust SDK.
Discussed with the Smithy team to address some ambiguity in the specification: https://smithy.io/2.0/spec/constraint-traits.html#constraint-trait-enforcement.
It was clarified that ValidationException is, informally, a synthetic error and should be used without having to declare any API as throwing it.
Action Items
Remove the need to explicitly declare ValidationException in the error closure of services / operations when containing constrained input by transparently adding it to the operation errors before proceeding with code generation. We currently do this behind the addValidationExceptionToConstrainedOperations codegen flag that users can opt into.