Skip to content

payjoin-cli RPC errors are obscured #1258

@spacebear21

Description

@spacebear21

For example:

❯ cargo run -- receive 1000
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.10s
     Running `/Users/spacebear/Projects/rust-payjoin/target/debug/payjoin-cli receive 1000`
Error: Failed to get new address

Caused by:
    Obtained failure status(500): Internal Server Error

This error message doesn't tell me what to do. The underlying issue was that I needed to load the bitcoin-cli wallet:

❯ bitcoin-cli -rpcwallet=receiver getnewaddress
error code: -18
error message:
Requested wallet does not exist or is not loaded

❯ bitcoin-cli loadwallet receiver
{
  "name": "receiver"
}

Error responses from the bitcoin-cli RPC should be propagated and displayed to the payjoin-cli user. This may be a limitation inherent from the bitcoind-async-client library in which case it should be addressed upstream.

Metadata

Metadata

Labels

good first issueDoes NOT mean "an LLM can do this." Please discuss the constraints and intended approach.payjoin-cli

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions