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
Currently there are some cases that error objects in JSON format are not properly decoded.
__type is assigned to the raw value of CodingKeys.type at here for JSON content payload, and it works fine in case that an error code is set to __type field in JSON object. (e.g. DynamoDB)
However, there are some services (e.g. rds-data, api-gateway) where error code is decided based on HTTP Status Code. Generated code for such services does not work.
where the delegate struct should be implemented? (maybe, in smoke-aws)
If the delegate struct is implemented correctly at a right place, would the solution above work? (as long as the delegate struct decides error based on HTTP Status Code.)
The text was updated successfully, but these errors were encountered:
Currently there are some cases that error objects in JSON format are not properly decoded.
__type
is assigned to the raw value of CodingKeys.type at here for JSON content payload, and it works fine in case that an error code is set to__type
field in JSON object. (e.g. DynamoDB)However, there are some services (e.g. rds-data, api-gateway) where error code is decided based on HTTP Status Code. Generated code for such services does not work.
Example case
rds-data returns an error JSON object like below.
The error JSON decoding fails and the error below is raised because there is no
__type
field.Question
I'm wondering if it would be possible to solve this issue by passing a specific
delegate name
to HttpClientConfiguration.clientDelegateNameOverride in a configuration (e.g. RDSConfiguration.swift). That delegate name is used in ModelClientDelegate. addJsonDelegate instead of JSONAWSHttpClientDelegate.The questions are
The text was updated successfully, but these errors were encountered: