Skip to content

Commit 8db4943

Browse files
authored
🔧 chore(ecosystem): close SQS Plugin Related Sentry Issues (#95117)
1 parent 4331c54 commit 8db4943

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/sentry_plugins/amazon_sqs/plugin.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,10 @@ def sqs_send_message(message):
181181

182182
sqs_send_message(message)
183183
except ClientError as e:
184-
if str(e).startswith("An error occurred (InvalidClientTokenId)") or str(e).startswith(
185-
"An error occurred (AccessDenied)"
184+
if (
185+
str(e).startswith("An error occurred (InvalidClientTokenId)")
186+
or str(e).startswith("An error occurred (AccessDenied)")
187+
or str(e).startswith("An error occurred (InvalidAccessKeyId)")
186188
):
187189
# If there's an issue with the user's token then we can't do
188190
# anything to recover. Just continue.
@@ -193,5 +195,8 @@ def sqs_send_message(message):
193195
# If there's an issue with the user's s3 bucket then we can't do
194196
# anything to recover. Just continue.
195197
return False
198+
elif "AWS.SimpleQueueService.NonExistentQueue" in str(e):
199+
# If the specified queue doesn't exist, we can't do anything to recover
200+
return False
196201
raise
197202
return True

0 commit comments

Comments
 (0)