]> Untitled Git - bdk-cli/commit
fix(create_tx,bump_fee): return errors instead of panicking
authorVihiga Tyonum <withtvpeter@gmail.com>
Sat, 26 Sep 2026 07:56:45 +0000 (08:56 +0100)
committerVihiga Tyonum <withtvpeter@gmail.com>
Sat, 26 Sep 2026 07:56:45 +0000 (08:56 +0100)
commit3e7db1b03d9e7954c3d9208ae0eaa0835f8b0c2f
tree90299591c3251d3be1854175eb78f1fddf222774
parentf3a1eafed9cefc3816ad066b4a7c554a4cb4d8df
fix(create_tx,bump_fee): return errors instead of panicking

`create_tx` and `bump_fee` called `.unwrap()` on `Result`s carrying
user-supplied input, so a mistyped argument aborted the process with a
Rust panic (exit 101) instead of a usage error (exit 1).

- propagate `add_utxos` failures in `create_tx` and `bump_fee` with `?`,
  adding `BDKCliError::AddUtxoError` so the malformed outpoint is named
- propagate `--add_data` base64 decoding and `PushBytesBuf` conversion
  failures in `create_tx`
- stop flattening `add_utxos` errors into `CreateTxError::UnknownUtxo`
in `create_sp_tx` and `create_dns_tx`, which discarded the real cause
- add an integration test asserting exit 1, never 101, for an unknown
  outpoint and for malformed base64

Fixes #325
CHANGELOG.md
src/error.rs
src/handlers/dns/mod.rs
src/handlers/offline.rs
tests/integration/offline.rs