-
Hi 👋🏼 I need to handle the error which occurs when trying to delete a queue but it does not exist. I can do import { QueueDoesNotExist } from '@aws-sdk/client-sqs';
// ...
catch(e) {
if(e instanceof QueueDoesNotExist) {
// Some error handling here...
}
} But error actually received is This error is not in import { SQSServiceException } from '@aws-sdk/client-sqs';
// ...
catch(e) {
if (e instanceof SQSServiceException && e.name === 'AWS.SimpleQueueService.NonExistentQueue') {
// Some error handling here...
}
} These are the packages I use:
Question 1What is the difference between Question 2Why |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @dmeiri - thanks for reaching out. If I understand this correctly, you're running into QueueDoesNotExist error as mentioned here in this post: https://repost.aws/knowledge-center/sqs-queuedoesnotexist-errors These could be one of the possible causes:
You can find the rest of possible causes in the blog post linked above. Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Hi @dmeiri , This was a modeling issue with the SQS API itself. Related to. You can update to the latest version by running: Thanks, |
Beta Was this translation helpful? Give feedback.
Hi @dmeiri ,
This was a modeling issue with the SQS API itself. Related to.
You are using a really old SDK version, in the newer SDK versions we have changed the wire protocol to the new JSON protocol which SQS now supports, and this problem went away.
You can update to the latest version by running:
npm i @aws-sdk/client-sqs@latest
Thanks,
Ran