btcsuite / btcd

An alternative full node bitcoin implementation written in Go (golang)
https://github.com/btcsuite/btcd/blob/master/README.md
ISC License
6.1k stars 2.31k forks source link

`btcjson`: map all bitcoind errors in one place #2101

Open yyforyongyu opened 5 months ago

yyforyongyu commented 5 months ago

As of today, we have multiple places to match the errors returned from bitcoind RPC responses. We should instead build it inside btcjson for better maintainability. We can collect all the errors from,

and do a string pattern match and turn them into a new set of error types inside btcjson.