Skip to content

feat: expose connectError event with HTTP status for transport override support#2821

Merged
idoros merged 2 commits intomainfrom
ido/expose-connection-error
Feb 4, 2026
Merged

feat: expose connectError event with HTTP status for transport override support#2821
idoros merged 2 commits intomainfrom
ido/expose-connection-error

Conversation

@idoros
Copy link
Contributor

@idoros idoros commented Feb 4, 2026

This PR exposes connection error information for ws-client-host through a new connectError event.

Changes in this PR:

  • Add a connectError event to the WsClientHost that reports a status number
  • Updates the connect_error handler from once to on, allowing multiple error events to be emitted during connection retries
  • Reorders socketServerOptions in launchEngineHttpServer so they are applied after transports, enabling them to override transport defaults

Note that these changes do not modify the default transports configuration. As a result, the currently reported connection error status will be 0. To surface a meaningful status code, Socket.IO must prioritize polling over websocket, ensuring the connection begins with polling before upgrading to WebSocket.

@idoros idoros self-assigned this Feb 4, 2026
@idoros idoros requested a review from cylon324 February 4, 2026 09:31
Copy link
Collaborator

@barak007 barak007 left a comment

Choose a reason for hiding this comment

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

test?

@idoros
Copy link
Contributor Author

idoros commented Feb 4, 2026

test?

there is no infra to check actual socket behavior and cause connection errors

@idoros idoros merged commit 5721475 into main Feb 4, 2026
6 checks passed
@idoros idoros deleted the ido/expose-connection-error branch February 4, 2026 09:41
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