Skip to content

SQS error code not match #5090

Closed
Closed
@chuzui

Description

@chuzui

Describe the bug

After the #5060, for example, the error code of deleting a non-existent queue is changed from AWS.SimpleQueueService.NonExistentQueue to NonExistentQueue. But the SQS api comes back with AWS.SimpleQueueService.NonExistentQueue in practise and make the error code check unworkable.

aws/aws-sdk-go-v2#2348
aws/aws-sdk#105

Expected Behavior

The error code of deleting a non-existent queue can match sqs.ErrCodeQueueDoesNotExist

Current Behavior

Not match

Reproduction Steps

input := &sqs.DeleteQueueInput{
                 // non-existent queue
		QueueUrl: aws.String(url),
	}

if _, err := s.DeleteQueue(input); err != nil {
	if ae, ok := err.(awserr.Error); ok && ae.Code() == sqs.ErrCodeQueueDoesNotExist {
		return nil
	} else {
		return err
	}
}

Possible Solution

No response

Additional Information/Context

No response

SDK version used

1.47.13

Environment details (Version of Go (go version)? OS name and version, etc.)

go1.19.7 linux/amd64

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.investigatingThis issue is being investigated and/or work is in progress to resolve the issue.p2This is a standard priority issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions