Skip to content

chore: Use try_send instead of send when queueing up tasks on the JS queue#162

Merged
poljar merged 2 commits intomainfrom
poljar/better-error-for-js-queue-failures
Mar 25, 2026
Merged

chore: Use try_send instead of send when queueing up tasks on the JS queue#162
poljar merged 2 commits intomainfrom
poljar/better-error-for-js-queue-failures

Conversation

@poljar
Copy link
Copy Markdown
Collaborator

@poljar poljar commented Mar 20, 2026

This allows us at least to use a more descriptive message if the operation fails.

The default panic message in the send() method is SendError which is shared by many other send calls an mpsc channels might make.

…queue

This allows us at least to use a more descriptive message if the
operation fails.

The default panic message in the `send()` method is `SendError` which is
shared by many other send calls an mpsc channels might make.
@poljar poljar requested a review from andybalaam March 23, 2026 13:58
Copy link
Copy Markdown
Member

@andybalaam andybalaam left a comment

Choose a reason for hiding this comment

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

One suggestion, looks helpful.

Comment thread seshat-node/src/tasks.rs Outdated
Co-authored-by: Andy Balaam <mail@artificialworlds.net>
@poljar poljar merged commit da20bf1 into main Mar 25, 2026
6 checks passed
@richvdh
Copy link
Copy Markdown
Member

richvdh commented Apr 13, 2026

I notice this is not in the release notes for 4.1.0. Shouldn't it be?

@poljar poljar deleted the poljar/better-error-for-js-queue-failures branch April 14, 2026 09:47
@poljar
Copy link
Copy Markdown
Collaborator Author

poljar commented Apr 14, 2026

I notice this is not in the release notes for 4.1.0. Shouldn't it be?

I didn't think that changing an unwrap() to a panic() would be interesting enough for the changelog. Well, why not: #167.

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