Skip to content

Conversation

@baac0
Copy link
Contributor

@baac0 baac0 commented Oct 30, 2025

Exceptions thrown from the createPayload() method in connections.ts are not propagated up the callback hierarchy and hence cannot be handled by a try/catch block around the client method invocation, but end up as uncaught exceptions. This happens e.g. when support for an optional compression scheme like lz4 is not actually installed.

This change fixes the issue by passing the error to the callback instead of re-throwing it.

- Fix connection error handling to use callback instead of throwing
- Add test for synchronous compression errors in producer
- Update connection test to properly handle async error scenarios
- Ensure errors are properly propagated through callback mechanism

Change-Id: I470ddf3a13871bd68ce92b65fbf24198d844de27
@ShogunPanda ShogunPanda merged commit 8957f84 into platformatic:main Nov 3, 2025
18 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.

2 participants