Skip to content

Commit

Permalink
refactor: error when psbt finalization fails
Browse files Browse the repository at this point in the history
  • Loading branch information
thevaibhav-dixit committed Apr 12, 2024
1 parent 840f782 commit f1ab14e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/job/batch_signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ pub async fn execute(
}
(Ok(None), _) => {
span.record("finalization_status", "stalled_due_to_finalization");
Ok((data, false))
Err(JobError::BatchSigningStalled(
"Stalled during PSBT finalization",
))
}
_ if stalled => {
span.record("finalization_status", "stalled");
Expand Down
2 changes: 2 additions & 0 deletions src/job/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ pub enum JobError {
PsbtMissingInSigningSessions,
#[error("JobError - psbt::Error: {0}")]
PsbtError(#[from] psbt::Error),
#[error("JobError - BatchSigningStalled: {0}")]
BatchSigningStalled(&'static str),
}

impl JobExecutionError for JobError {}

0 comments on commit f1ab14e

Please sign in to comment.