HomePhabricator

[Chronik] Fix WebSocket emitting Error messages

Description

[Chronik] Fix WebSocket emitting Error messages

Summary:
When a subscription is invalid, Chronik responds with the error in a separate message.

However, errors are currently encoded incorrectly (in a Error msg directly instead of wrapping it in a WsMsg as promised).

This fixes the encoding and also fixes a small bug in client.py where messages that fail to parse would simply be dropped; now their unparsed bytes are returned to tests have a more appropriate failure mode than simply timing out.

Test Plan: ./test/functional/test_runner.py chronik_ws_script.py

Reviewers: Fabien, #bitcoin_abc, bytesofman

Reviewed By: Fabien, #bitcoin_abc, bytesofman

Subscribers: bytesofman

Differential Revision: https://reviews.bitcoinabc.org/D15472

Details

Provenance
tobias_ruckAuthored on Feb 17 2024, 09:10
tobias_ruckPushed on Feb 17 2024, 17:08
Reviewer
Restricted Project
Differential Revision
D15472: [Chronik] Fix WebSocket emitting Error messages
Parents
rABC58a837932d0a: [Cashtab] Update airdrop.js with direct antd calls
Branches
Unknown
Tags
Unknown