Follow-up from #277 (review)
Server errors are meant to be returned as a response, but are being returned in places that don't always make sense, e.g.:
|
return Err(Error::Server("Output substitution is disabled.".into())); |
|
.map_err(|e| Error::Server(e.into()))? |
|
.map(|res| Psbt::from_str(&res.psbt).map_err(|e| Error::Server(e.into()))) |
It would be good to review usage of crate::receive::Error and improve error nesting generally.
Follow-up from #277 (review)
Server errors are meant to be returned as a response, but are being returned in places that don't always make sense, e.g.:
rust-payjoin/payjoin/src/receive/mod.rs
Line 486 in 4bc8fe3
rust-payjoin/payjoin-cli/src/app/v1.rs
Line 318 in 37d255e
rust-payjoin/payjoin-cli/src/app/v2.rs
Line 345 in 37d255e
It would be good to review usage of
crate::receive::Errorand improve error nesting generally.