Skip to content

Remove terminal_error method for sender and receiver#1123

Merged
arminsabouri merged 1 commit intopayjoin:masterfrom
benalleng:remove-terminal-error-method
Oct 3, 2025
Merged

Remove terminal_error method for sender and receiver#1123
arminsabouri merged 1 commit intopayjoin:masterfrom
benalleng:remove-terminal-error-method

Conversation

@benalleng
Copy link
Collaborator

@benalleng benalleng commented Sep 30, 2025

The public terminal_error method does not really serve a purpose as we now deal with errors directly in the state machine and don't really have an opportunity to call the terminal_error method where looking for an error wouldn't be sufficient.

Closes #1118

Pull Request Checklist

Please confirm the following before requesting review:

@coveralls
Copy link
Collaborator

coveralls commented Sep 30, 2025

Pull Request Test Coverage Report for Build 18223941555

Details

  • 28 of 114 (24.56%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.4%) to 84.237%

Changes Missing Coverage Covered Lines Changed/Added Lines %
payjoin/src/core/send/v2/session.rs 28 30 93.33%
payjoin-cli/src/app/v2/mod.rs 0 84 0.0%
Files with Coverage Reduction New Missed Lines %
payjoin/src/core/send/v2/session.rs 1 94.74%
Totals Coverage Status
Change from base Build 18203971889: -0.4%
Covered Lines: 8962
Relevant Lines: 10639

💛 - Coveralls

@spacebear21
Copy link
Collaborator

Blocked by #1132

@spacebear21 spacebear21 mentioned this pull request Oct 2, 2025
2 tasks
@benalleng benalleng force-pushed the remove-terminal-error-method branch 3 times, most recently from 49dda72 to 2b66380 Compare October 2, 2025 18:56
@benalleng benalleng removed the blocked label Oct 2, 2025
@benalleng benalleng force-pushed the remove-terminal-error-method branch from 2b66380 to a380dc0 Compare October 2, 2025 19:07
@benalleng benalleng force-pushed the remove-terminal-error-method branch 4 times, most recently from 44d98bd to 47ebcd1 Compare October 2, 2025 20:24
Copy link
Collaborator

@arminsabouri arminsabouri left a comment

Choose a reason for hiding this comment

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

Approach Ack 🔥
What else needs to be done for this to come out of draft?

@DanGould
Copy link
Contributor

DanGould commented Oct 3, 2025

looks like squashing the commits, but that could be done w squash and merge

@benalleng benalleng marked this pull request as ready for review October 3, 2025 10:20
@benalleng
Copy link
Collaborator Author

benalleng commented Oct 3, 2025

Sorry, stepped off before I marked it ready for review, I would like a definitive decision on whether to return only as an Ok resultand expect vs accepting errors as the 2 fixup commits take opposite approaches on the cli and test respectively, so deciding which to settle on before squashing them, but then this is ready to go.

@arminsabouri arminsabouri mentioned this pull request Oct 3, 2025
@benalleng benalleng force-pushed the remove-terminal-error-method branch from 47ebcd1 to ef9c579 Compare October 3, 2025 12:39
.map(|e| e.to_json().to_string()),
};
recv_rows.push(row);
match replay_receiver_event_log(&persister) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any reason we wouldnt match on a error for the active sessions? They can also expire and throw

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Matched to errors on active sessions too now, but the completed_at field remains None on an error in these cases.

The public `terminal_error` method does not really serve a purpose as we
now deal with errors directly in the state machine and don't really have
an opportunity to call the `terminal_error` method where looking for an
error wouldn't be sufficient.
@benalleng benalleng force-pushed the remove-terminal-error-method branch from ef9c579 to 47bdef2 Compare October 3, 2025 13:39
Copy link
Collaborator

@arminsabouri arminsabouri left a comment

Choose a reason for hiding this comment

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

codeACK

@arminsabouri arminsabouri merged commit 369c327 into payjoin:master Oct 3, 2025
14 checks passed
@benalleng benalleng deleted the remove-terminal-error-method branch October 6, 2025 18: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.

New Mutants Found

5 participants