Skip to content

Commit

Permalink
add error for finalize_psbt
Browse files Browse the repository at this point in the history
  • Loading branch information
jbesraa committed Jul 31, 2023
1 parent 9489175 commit 9f51146
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions payjoin/src/receive/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pub(crate) enum InternalRequestError {
PsbtParseError(bitcoin::psbt::PsbtParseError),
Base64(bitcoin::base64::DecodeError),
BitcoinCoreRpc(bitcoind::bitcoincore_rpc::Error),
PsbtFinalizingError(&'static str),
Io(std::io::Error),
MissingHeader(&'static str),
InvalidContentType(String),
Expand Down Expand Up @@ -80,6 +81,8 @@ impl fmt::Display for RequestError {
}

match &self.0 {
InternalRequestError::PsbtFinalizingError(e) =>
write_error(f, "psbt-finalizing-error", e),
InternalRequestError::PsbtParseError(e) => write_error(f, "psbt-parse-error", e),
InternalRequestError::BitcoinCoreRpc(e) => write_error(f, "bitcoin-core-rpc-error", e),
InternalRequestError::Psbt(e) => write_error(f, "psbt-error", e),
Expand Down

0 comments on commit 9f51146

Please sign in to comment.