Skip to content

fix(core): explain stale-peer and no-network errors instead of raw socket codes - #432

Merged
Mearman merged 1 commit into
mainfrom
fix/friendly-peer-errors
Oct 19, 2026
Merged

Mearman merged 1 commit into
mainfrom
fix/friendly-peer-errors

Conversation

@Mearman

@Mearman Mearman commented Oct 19, 2026

Copy link
Copy Markdown
Member

Dials and sends to a peer that has exited or restarted reached the pi UI as bare connect ECONNREFUSED / read ECONNRESET / disconnected before a response arrived lines, one per attempt, and a host with no network route raised send ENETUNREACH 255.255.255.255:19877 on every beacon. None of them said what was wrong or whether to act.

Dial and send failures are now a PeerLinkError that names the peer and keeps the transport's errno. describeMeshError turns the known conditions (stale peer address, dropped send, no network) into a sentence saying what happened and what it most likely means, and createMeshErrorReporter writes each recognised condition once per reporter instead of once per attempt. The pi extension now uses the shared reporter rather than formatting each error itself. Unrecognised errors are written as before, every time.

Refs #427. It closes once a release carrying this has reached the reporter.

…cket codes

A peer that exits or restarts leaves a stale address behind, and the dials
and sends to it reached the pi UI as bare ECONNREFUSED or ECONNRESET
messages, one per attempt. Likewise a host with no network route raised
ENETUNREACH on every first-contact beacon.

Dial and send failures are now a PeerLinkError that names the peer and keeps
the transport's errno. describeMeshError turns the known conditions into a
sentence saying what happened, what it most likely means and whether
anything needs doing, and the reporter writes each recognised condition once
instead of once per attempt. The pi bridge uses the shared reporter.

Refs #427
@Mearman
Mearman marked this pull request as ready for review October 19, 2026 16:26
@ExaDev ExaDev deleted a comment from chatgpt-codex-connector Bot Oct 19, 2026
@ExaDev ExaDev deleted a comment from chatgpt-codex-connector Bot Oct 19, 2026
@ExaDev ExaDev deleted a comment from chatgpt-codex-connector Bot Oct 19, 2026
@Mearman
Mearman merged commit 49c8d73 into main Oct 19, 2026
7 checks passed
@Mearman
Mearman deleted the fix/friendly-peer-errors branch October 19, 2026 16:28
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 8.14.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant