Rust client drops connection-level errors when actionId is null (JSON/CBOR)
Maintainers usually reply within 1 day
@DibbayajyotiRoy is already working on this.
Since Oct 2, 2026.
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rivet-dev/rivet
-
Queue docs say completable messages are removed on receive, but they stay stored until complete()Possibly taken @Saisharathchandranandnetha claimed this 25 days ago. Open
Difficulty 1/5 1-3 hours Newbie friendliness 91/100
rivet-dev/rivet#5762 · 1 comment ·
Maintainers usually reply within 1 day
-
Serverless listener forwards /start to the application when basePath is "/"Possibly taken @Saisharathchandranandnetha claimed this 27 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
rivet-dev/rivet#5755 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 22/100
rivet-dev/rivet#5881 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
rivet-dev/rivet#5850 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
rivet-dev/rivet#5837 · 6 comments ·
Maintainers usually reply within 1 day
Similar issues
-
build: Update rust versionPossibly taken A pull request linked to this issue is open or already merged. Opendependencies
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
ibm-granite-community/granite-cli#229 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
orottier/web-audio-api-rs#658 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
aosama/astronomical#1318 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
shep-pm/shep-kelpie#980 ·
Maintainers usually reply within 1 day