Skip to content

Conversation

@DanGould
Copy link
Contributor

#220 uncovered an issue with the OhttpKeys::decode return error type returning an internal error. I think it still makes sense to return the internal ohttp::Error rather than wrapping it in another type that gives no additional context. That also led me to clean up the whole module's error handling.

Fix #222
Fix #142

@DanGould DanGould requested a review from jbesraa March 25, 2024 14:28
Copy link
Contributor

@jbesraa jbesraa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

FeeRateBelowMinimum => write!(f, "the fee rate of proposed transaction is below minimum"),
#[cfg(feature = "v2")]
V2(e) => write!(f, "v2 error: {}", e),
HpkeError(e) => write!(f, "v2 error: {}", e),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not the happiest with this error string, but we should be reconsidering the context we want to keep with send::Error anyhow in a later issue.

@DanGould DanGould merged commit be6c9ef into payjoin:master Mar 25, 2024
@DanGould DanGould deleted the v2-err branch March 25, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

payjoin/v2 module errors are one big ugly pile Out of bound issues don't return a nice error

2 participants