docs(plans): error-variants audit — 6-PR breakdown of ~80 sites (#583)
Fresh audit against main (post-#582) of v3-api-ergonomics §5 item 1:
parent estimated ~42 untyped Error::Simple/Message sites; actual is ~80
across 27 files (helpers in common/error_helpers.rs and decoder paths
in realtime/accounts/contracts/news/historical weren't in original tally).
plans/error-variants-audit.md categorizes every site by target typed
variant and slices the sweep into 6 small PRs:
PR-1 validation → InvalidArgument
PR-2 EOF / no response → UnexpectedEndOfStream
PR-3 server-version + protobuf decode
PR-4 datetime / message-type parse → Parse (lands new
Error::parse_field / Error::parse_proto constructors)
PR-5 cursor EOF + unexpected-response + decoder mismatch
PR-6 new Error::ConnectionRejected(String) variant
Open items resolved with this audit:
- Parent §5.3 Parse-shape: Option 4 — no-index constructors keep
the variant tuple unchanged, encapsulate the fake-0 placeholder.
Future promotion to Option<usize> remains possible.
- PR-6 connection-rejected: new ConnectionRejected(String) variant
(additive via #[non_exhaustive]), preserves io::Error detail and
lets downstream code discriminate from generic ConnectionFailed.
Parent plan §5 item 1 → [~] with audit-count correction and link;
parent §5.3 → [~] with Option 4 resolution recorded. W
Wil Boayue committed
860a19277cb94a9d5d67a1444d706eade3e658cf
Parent: 1ae1d7b
Committed by GitHub <noreply@github.com>
on 5/18/2026, 12:07:57 AM