Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[autosync] Revamp error system (#1233)
This commit rewrites the server's error system so that it can render accurate protocol-specific HTTP responses adhering to the malformed requests protocol tests' expectations. It also makes 400+ of the tests relating to request deserialization pass. Previously, we were rendering the `SmithyRejection` type in our HTTP responses directly as we desired. However, AWS protocols' errors are not as granular: many different request deserialization failure causes are conflated and signaled to clients under a single `SerializationException` in the response. This commit introduces a new concept, the `RuntimeEror` type, which groups rejections and renders the responses that these protocols expect. Rejection types now become an internal detail of the framework that only serve for us maintainers to keep track and inventory all possible error causes in great detail. Extension types have also been renamed to better reflect their purpose. For more information about this patch, read the added documentation to the `rejection`, `extension`, and `runtime_error` modules.
- Loading branch information