Open miyajan opened 5 months ago
Hi @miyajan ,
I think I see the issue here.
The the SSO Admin API model specifies the error field Message
(upper case) but returns message
(in lower case) this mismatch will cause the deserializer logic to not get a match between the incoming data and expected shape and would explain the omission.
I have created a ticket with the SSO team to address this discrepancy. In the meantime, if you are just looking to inspect the raw response coming back from the service and bypass the deserialization, you can enable the response logging:
func main() {
cfg, err := config.LoadDefaultConfig(
context.TODO(),
config.WithRegion("us-east-1"),
config.WithClientLogMode(aws.LogResponseWithBody),
)
if err != nil {
log.Fatalf("unable to load SDK config, %v", err)
}
I'll transfer this issue to the cross-SDK repo and will update you there once I hear back from the SSO service team.
Thanks again, Ran~
P113857014
Describe the bug
I want to get Mesage when ValidationException occurs in PutInlinePolicyToPermissionSet function, but I can't get it.
Expected Behavior
I get
ValidationException: <Error Message>
when I run the following codeCurrent Behavior
Only
ValidationException:
is displayed.Reproduction Steps
As written in Expected Behavior.
Possible Solution
Looking at the response body, the ValidationException message is returned with a key
message
, but the generated code checksMessage
. https://github.com/aws/aws-sdk-go-v2/blob/a7db10670faedd542dc92cec6d0c602e5315a3a9/service/ssoadmin/deserializers.go#L12484Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
Compiler and Version used
go version go1.21.5 darwin/arm64
Operating System and version
macOS 14.1