Skip to content

fix: propagate channel errors to connection and handle channel close#133

Merged
baelter merged 5 commits intomainfrom
channel-error-handling
Sep 9, 2025
Merged

fix: propagate channel errors to connection and handle channel close#133
baelter merged 5 commits intomainfrom
channel-error-handling

Conversation

@carlhoerberg
Copy link
Copy Markdown
Member

  • Modify onerror handler in AMQPChannel to propagate errors to the connection level
  • Ensure channel errors are properly handled regardless of closure reason
  • Prevent propagation from connection channel (id=0) to avoid recursion

🤖 Generated with Claude Code

…properly

- Modify onerror handler in AMQPChannel to propagate errors to the connection level
- Ensure channel errors are properly handled regardless of closure reason
- Prevent propagation from connection channel (id=0) to avoid recursion

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@carlhoerberg carlhoerberg force-pushed the channel-error-handling branch from d969fe6 to afa527c Compare June 10, 2025 19:13
@carlhoerberg carlhoerberg marked this pull request as ready for review June 11, 2025 09:00
Comment thread src/amqp-channel.ts Outdated
Comment thread src/amqp-channel.ts Outdated
if (closedByServer) this.onerror(err.message)

// Call onerror for any error, whether from server or from a channel operation
if (err.message !== "Connection closed by client") {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cloud have our own Error class for this to make this check a bit more future proof.

@baelter baelter merged commit 749ca4b into main Sep 9, 2025
6 checks passed
@baelter baelter deleted the channel-error-handling branch September 9, 2025 11:20
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.

3 participants