Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Rust client drops connection-level errors when actionId is null (JSON/CBOR)

Open Beginner friendly
#5,819 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@DibbayajyotiRoy is already working on this.

Since Oct 2, 2026.

  • #5820 by @DibbayajyotiRoy — open
  • #5864 by @anasachoury — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
networking

Research direction

Start in rivetkit-rust/packages/client/src/protocol/codec.rs at to_client_from_json_value and compare the JSON and CBOR decoding paths. Use the repro payload with EncodingKind::Json and its CBOR equivalent. Done means connection-level errors decode with action_id: None and metadata: None, allowing on_error to fire instead of dropping the message.

Written by the indexing model from the issue text.

Description

The server encodes connection-level Error messages (errors not tied to an action, for example when onBeforeConnect rejects or createConnState fails) with "actionId": null in the JSON and CBOR encodings (rivetkit-core/src/registry/actor_connect.rs).

The Rust client's to_client_from_json_value (rivetkit-rust/packages/client/src/protocol/codec.rs) calls parse_json_u64 on that null and fails with invalid json unsigned integer. The websocket driver logs the decode failure at debug level and drops the message, so on_error never fires and the caller only sees the socket close. "metadata": null has a milder variant: it decodes to Some(cbor null) instead of None.

BARE is not affected since it uses real optional types.

Repro

Decode this with EncodingKind::Json (or the CBOR equivalent):

{"body":{"tag":"Error","val":{"group":"a","code":"b","message":"c","actionId":null,"metadata":null}}}

Expected: an Error with action_id: None and metadata: None.

Actual: Err(invalid json unsigned integer), and the connection error is silently lost.

Dominant language
Rust
Stars
6.3k
Forks
279
Avg merge
1d 12h
Merged PRs (30d)
50

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rivet-dev/rivet

All issues in rivet-dev/rivet

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.