Skip to content

[11.x] Throw ManagedQueueNotFoundException when a managed queue is missing#60277

Open
kieranbrown wants to merge 3 commits into
laravel:11.xfrom
kieranbrown:managed-queue-not-found-exception-11.x
Open

[11.x] Throw ManagedQueueNotFoundException when a managed queue is missing#60277
kieranbrown wants to merge 3 commits into
laravel:11.xfrom
kieranbrown:managed-queue-not-found-exception-11.x

Conversation

@kieranbrown
Copy link
Copy Markdown
Member

Backport of #60275.

When a managed queue doesn't exist, the underlying AWS SDK error is vague and doesn't include the queue name, making it hard to debug.

This PR registers an SQS client middleware (in Foundation\Cloud\QueueConnector) that intercepts AWS.SimpleQueueService.NonExistentQueue errors and rethrows them as a new ManagedQueueNotFoundException with a clear message:

Managed queue [beep] does not exist.

The original AwsException is preserved as $previous. Because the middleware sits at the handler-stack level, every SQS operation (push, pop, size, clear, batch, etc.) is covered without wrapping individual queue methods.

Scoped to managed queues only — plain SqsQueue users are unaffected.

🤖 Generated with Claude Code

kieranbrown and others added 3 commits May 26, 2026 10:22
…ed queues

Wraps AWS.SimpleQueueService.NonExistentQueue errors at the SQS client
handler stack so every managed queue operation surfaces a clear message
including the queue name, instead of the vague AWS error.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… test

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant