HomePhabricator

[chronik-client] Do not try next server if error is unrelated to server outage

Description

[chronik-client] Do not try next server if error is unrelated to server outage

Summary:
chronik-client is treating legitimate errors as server connection errors (for example, trying to get a block that does not exist, or a tx that fails to broadcast in NNG)

Server connection errors have a code key while chronik method errors do not. Use this instead of a string check which conflicts with other types of chronik errors.

This supersedes D15150

Test Plan: See test plan in D14915 or let CI build it. Ref draft D15210 which tests this against a method where chronik is expected to fail for non-server reasons.

Reviewers: #bitcoin_abc, Fabien, emack

Reviewed By: #bitcoin_abc, Fabien, emack

Subscribers: emack, Fabien

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

Details

Provenance
bytesofmanAuthored on Jan 19 2024, 16:30
bytesofmanPushed on Jan 22 2024, 12:22
Reviewer
Restricted Project
Differential Revision
D15211: [chronik-client] Do not try next server if error is unrelated to server outage
Parents
rABCd6b851ad3542: [electrum] remove support for signed payment requests in URIs
Branches
Unknown
Tags
Unknown