Skip to content
Unverified Commit 4afa8a3c authored by david-perez's avatar david-perez Committed by GitHub
Browse files

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.
parent e6d09ea6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment