Skip to content

Conversation

@phrwlk
Copy link
Contributor

@phrwlk phrwlk commented Oct 24, 2025

The connect() function incorrectly mapped websocket handshake/transport failures from tokio-tungstenite connect_async into EthStatsError::InvalidUrl, which conflated network errors with URL format issues. This patch reclassifies those errors to EthStatsError::WebSocket and uses the existing Url(ParseError) variant for Url::parse failures. It also avoids unnecessary URL string conversion by passing url.as_str() to connect_async. This ensures accurate error semantics consistent with the error enum design and improves debuggability.

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

this is cleaner, I like it

@github-project-automation github-project-automation bot moved this from Backlog to In Progress in Reth Tracker Oct 25, 2025
@mattsse mattsse added this pull request to the merge queue Oct 25, 2025
Merged via the queue into paradigmxyz:main with commit e22a511 Oct 25, 2025
41 of 42 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Reth Tracker Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants