Closed johnsonaj closed 3 months ago
May be the same underlying issue as https://github.com/aws/aws-sdk-go-v2/issues/2476. Can you provide the raw error response body?
May be the same underlying issue as aws/aws-sdk-go-v2#2476. Can you provide the raw error response body?
@lucix-aws Does this work?
request failed with unretryable error https response error StatusCode: 404, RequestID: c1cf4ca4-1875-495d-91c2-75a627a5dc26, api error ResourceNotFoundException: Canary not found.
or
operation error synthetics: GetCanary, https response error StatusCode: 404, RequestID: 2f77b795-fcca-4c0e-aa9e-1db082b4614e, api error ResourceNotFoundException: Canary not found.
Hi @johnsonaj ,
The reason the error is not being populated with the correct type, is because its not listed as a valid error in the server's specification.
You can see that according to the docs for getCanary()
only expects two types of modeled errors:
This is also specified in the API model for the service here , and therefore the SDK's error deserializer would not generate a case for that as seen here.
So while the error gets correctly deserialized, the SDK doesn't "know" that getCanary can return said excpetion, and just turns it into a generic smithy error.
I'll review this with the team and see if this is something we can solve with the service team itself.
Thanks, Ran~
I created an internal ticket with the service team to fix this P117442165
.
Transferring to the Cross-SDK repo for further tracking.
Thanks again, Ran~
Hi there, I have received confirmation that this is the service team's backlog. Since this is not something the SDK team can address I'm going to go ahead and close this.
Thanks again for reporting this. Ran~
This issue is now closed.
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
When calling
GetCanary
on a non-existent resource the type is not being returned correctly if the resource does not exist. However, when looking at theerr.Error()
, the correct error information is in the string.Expected Behavior
when asserting the
ResourceNotFoundException
error as a type, it should correctly serialize astypes.ResourceNotFoundException
Current Behavior
Type is not correctly serialized.
err.Error()
contains all of the correct information.Reproduction Steps
Call
synthetics.GetCanary()
with a resource that does not existPossible Solution
No response
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
github.com/aws/aws-sdk-go-v2/service/synthetics v1.22.7
Compiler and Version used
go version go1.21.6 darwin/arm64
Operating System and version
MacOS Sonoma 14.3