Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(type-safe-api): include error header expected by smithy generate…
…d client in handler wrappers (#468) Clients generated directly from Smithy (using the typescript-codegen plugin) can deserialise error responses into the appropriate generated model classes, but they do this by checking for a special `x-amzn-errortype` header. This change updates the generated handler wrappers to include the appropriate value for this header for error responses. Note that OpenAPI specs generated from Smithy add "ResponseContent" as a suffix to all response data types, so we remove this in order to match the appropriate error structure ID. If the response data type doesn't end with ResponseContent, it didn't come from Smithy so there's no need to return this header anyway. re #460
- Loading branch information