]> Untitled Git - bdk-cli/commitdiff
Merge bitcoindevkit/bdk-cli#363: Propagate errors correctly when decoding and parsing... master github/master
authormerge-script <m@vaan.io>
Mon, 16 Nov 2026 14:34:04 +0000 (18:34 +0400)
committermerge-script <m@vaan.io>
Mon, 16 Nov 2026 14:34:04 +0000 (18:34 +0400)
d8176e837799c65236fe5655b848b1a7118c0b5a Propagate PSBT decoding and parsing errors (emma31-dev)

Pull request description:

  ### Description

  Propagate PSBT decoding and parsing errors instead of wrapping them in `Error::Generic`.

  - `BASE64_STANDARD.decode()` failures in `sign`, `finalize_psbt`, and `broadcast` now propagate directly via `?`
  - `Psbt::deserialize()` failures are no longer swallowed into a generic string message
  - `BlockchainClient::broadcast()` maps backend errors to dedicated typed variants (`Error::Electrum`, `Error::Esplora`, `Error::BitcoinCoreRpcError`)
  - `wallet.apply_update()` / `apply_update_events()` map to `Error::Chain` instead of `Error::Generic`
  - Integration tests added for `sign`, `finalize_psbt`, and `broadcast` error paths

  Fixes #357 . Related to the broader error-propagation cleanup across the codebase.

  ### Notes to the reviewers

  Uses the existing `From` conversions for `DecodeError` and `PsbtError`.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk-cli/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

  #### Bugfixes:

  * [x] I'm linking the issue being fixed by this PR

ACKs for top commit:
  tvpeter:
    ACK d8176e837799c65236fe5655b848b1a7118c0b5a
  vadim-anfv:
    ACK d8176e837799c65236fe5655b848b1a7118c0b5a

Tree-SHA512: 81a703a8758e3a91a46278346b425f71b526d34982d3da36279703fec309eaa407674ea641cc130d5ec2ae36fdf30744e7893d71b0407751e21ed6fdca0cfbb1

1  2 
src/handlers/online.rs

Simple merge