Skip to content

Correct create_error_request return type#1715

Merged
spacebear21 merged 1 commit into
payjoin:masterfrom
xstoicunicornx:fix-error-type
Jul 10, 2026
Merged

Correct create_error_request return type#1715
spacebear21 merged 1 commit into
payjoin:masterfrom
xstoicunicornx:fix-error-type

Conversation

@xstoicunicornx

Copy link
Copy Markdown
Collaborator

Summary

Resolves #1714. Receiver<HasReplyableError>::create_error_request is currently employing a SessionError error type when it should be using CreateRequestError error type instead, just like all the create request methods. This PR makes that correction.

Pull Request Checklist

Please confirm the following before requesting review:

@xstoicunicornx xstoicunicornx marked this pull request as draft July 8, 2026 22:58
@coveralls

coveralls commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 29038187899

Coverage decreased (-0.02%) to 85.986%

Details

  • Coverage decreased (-0.02%) from the base build.
  • Patch coverage: 4 of 4 lines across 1 file are fully covered (100%).
  • 6 coverage regressions across 2 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

6 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
payjoin/src/core/receive/v2/error.rs 5 31.82%
payjoin/src/core/receive/v2/mod.rs 1 92.23%

Coverage Stats

Coverage Status
Relevant Lines: 15649
Covered Lines: 13456
Line Coverage: 85.99%
Coverage Strength: 348.62 hits per line

💛 - Coveralls

@xstoicunicornx xstoicunicornx marked this pull request as ready for review July 9, 2026 05:01
spacebear21
spacebear21 previously approved these changes Jul 9, 2026

@spacebear21 spacebear21 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ACK, minor style comment left below

Comment thread payjoin/src/core/receive/v2/mod.rs Outdated
reply_key,
)
.map_err(InternalSessionError::Hpke)?
.map_err(InternalCreateRequestError::Hpke)?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: this should work because From is implemented for CreateRequestError.

Suggested change
.map_err(InternalCreateRequestError::Hpke)?
?

@spacebear21 spacebear21 added this to the payjoin-1.0 milestone Jul 9, 2026

@spacebear21 spacebear21 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ACK

@spacebear21 spacebear21 merged commit 0f36b46 into payjoin:master Jul 10, 2026
22 checks passed
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.

Receiver<HasReplyableError>::create_error_request should maybe return CreateRequestError error type

3 participants