Unable to capture error on deleting NonExistentQueue #2348
Labels
bug
This issue is a bug.
p2
This is a standard priority issue
service-api
This issue is due to a problem in a service API, not the SDK implementation.
Describe the bug
I am trying to catch the error that queue does not exist when deleting a non-existent queue. But I unable to check if the error is of type
*types.QueueDoesNotExist
witherrors.As
Expected Behavior
errors.As is able to convert
api error AWS.SimpleQueueService.NonExistentQueue: The specified queue does not exist for this wsdl version
intotypes.QueueDoesNotExist
Current Behavior
Unable to unwrap error. The error string returned by the Go SDK is "api error AWS.SimpleQueueService.NonExistentQueue: The specified queue does not exist for this wsdl version."
Reproduction Steps
errors.As
withtypes.QueueDoesNotExist
types.QueueDoesNotExist
Example code repo https://github.com/Moulick/sqs-error-catching
Possible Solution
No response
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
module sqs
go 1.20
require (
github.com/aws/aws-sdk-go-v2 v1.22.1
github.com/aws/aws-sdk-go-v2/config v1.22.0
github.com/aws/aws-sdk-go-v2/service/sqs v1.26.0
github.com/aws/aws-sdk-go-v2/service/sts v1.25.0
)
require (
github.com/aws/aws-sdk-go-v2/credentials v1.15.1 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.1 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.1 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.5.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.17.0 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.0 // indirect
github.com/aws/smithy-go v1.16.0 // indirect
)
Compiler and Version used
go version go1.21.3 darwin/arm64
Operating System and version
MacOS Sonoma 14
The text was updated successfully, but these errors were encountered: