Closed
Description
Acknowledgements
- I have searched (https://github.com/aws/aws-sdk/issues?q=is%3Aissue) for past instances of this issue
- I have verified all of my SDK modules are up-to-date (you can perform a bulk update with
go get -u github.com/aws/aws-sdk-go-v2/...
)
Describe the bug
The field IsDefault
(added in [email protected]
, Release 2024-11-18) in the connect
service's ContactFlow
struct has Go type bool
:
aws-sdk-go-v2/service/connect/types/types.go
Lines 1008 to 1065 in 18fea5d
The upstream service is incorrectly serializing this field as a string
http.response.body=
| {
| "ContactFlow" : {
| "Arn" : "arn:aws:connect:us-west-2:123456789012:instance/5d367605-5d5b-4d98-a442-fe88e573aaaa/contact-flow/2f3b8896-ee32-48d5-981b-e287673e8f4f",
| "Id" : "2f3b8896-ee32-48d5-981b-e287673e8f4f",
| "IsDefault" : "false",
| "Name" : "resource-test-terraform-7075749418873109470",
| "Type" : "CONTACT_FLOW",
| "State" : "ACTIVE",
| "Status" : "PUBLISHED",
| "LastModifiedRegion" : "us-west-2",
| "LastModifiedTime" : 1.73229019499E9,
| "FlowContentSha256" : "9b5906e4b563c7d71dadd8f911d8c88db02ccd38a92edd17b55f92e302c6afaf",
| "Description" : "Created",
| "Content" : " {\n\t\t\"Version\": \"2019-10-30\",\n\t\t\"StartAction\": \"12345678-1234-1234-1234-123456789012\",\n\t\t\"Actions\": [\n\t\t\t{\n\t\t\t\t\"Identifier\": \"12345678-1234-1234-1234-123456789012\",\n\t\t\t\t\"Type\": \"MessageParticipant\",\n\t\t\t\t\"Transitions\": {\n\t\t\t\t\t\"NextAction\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n\t\t\t\t\t\"Errors\": [],\n\t\t\t\t\t\"Conditions\": []\n\t\t\t\t},\n\t\t\t\t\"Parameters\": {\n\t\t\t\t\t\"Text\": \"Created\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"Identifier\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n\t\t\t\t\"Type\": \"DisconnectParticipant\",\n\t\t\t\t\"Transitions\": {},\n\t\t\t\t\"Parameters\": {}\n\t\t\t}\n\t\t]\n }\n",
| "Tags" : {
| "Method" : "Created",
| "Name" : "Test Contact Flow"
| }
| }
| }
, causing runtime errors:
deserialization failed, failed to decode response body with invalid JSON, expected Boolean to be of type *bool, got string instead
See hashicorp/terraform-provider-aws#40267.
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
The DescribeContactFlow
API call should succeed with the correct value for IsDefault
returned.
Current Behavior
Runtime deserialization error.
Reproduction Steps
input := &connect.DescribeContactFlowInput{
ContactFlowId: aws.String(contactFlowID),
InstanceId: aws.String(instanceID),
}
output, err := conn.DescribeContactFlow(ctx, input)
Possible Solution
No response
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
% grep connect go.mod
github.com/aws/aws-sdk-go-v2/service/codeconnections v1.5.6
github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.29.6
github.com/aws/aws-sdk-go-v2/service/connect v1.116.0
github.com/aws/aws-sdk-go-v2/service/connectcases v1.21.6
github.com/aws/aws-sdk-go-v2/service/directconnect v1.29.6
github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.21.6
github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.35.6
github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.9.6
Compiler and Version used
go 1.23.2
Operating System and version
macos