Skip to content

Fix: channel.get() does not yield errors to the callback (#832)#848

Merged
cressie176 merged 3 commits into
mainfrom
fix/832-get-error-callback
May 6, 2026
Merged

Fix: channel.get() does not yield errors to the callback (#832)#848
cressie176 merged 3 commits into
mainfrom
fix/832-get-error-callback

Conversation

@cressie176

Copy link
Copy Markdown
Collaborator

Summary

  • Extracts a shared convertCloseFrameToError helper from _rpc in channel.js
  • Fixes callback_model.js get() which silently dropped close frame errors, never invoking the callback
  • Fixes channel_model.js get() which rejected with a raw close frame object rather than a proper Error instance
  • Adds a focused describe('get') block to the promise API tests covering empty queue, message present, and queue-not-found cases

Closes #832

🤖 Generated with Claude Code

cressie176 and others added 3 commits May 6, 2026 06:41
When the server closed the channel in response to a BasicGet (e.g. queue
not found), the callback API silently dropped the error and the promise
API rejected with a raw close frame rather than a proper Error instance.

Extracts a shared convertCloseFrameToError helper from _rpc and uses it
in both get() implementations so errors are consistently surfaced as
Error objects with .code, .classId and .methodId properties.

Adds a focused describe('get') block to the promise API tests covering
the empty queue, message present, and queue-not-found cases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cressie176
cressie176 merged commit a8dc4d4 into main May 6, 2026
4 checks passed
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.

channel.get callback does not yield errors

1 participant