Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle payjoin errors according to BIP 78 #940

Merged
merged 2 commits into from
Jan 11, 2024

Conversation

DanGould
Copy link
Contributor

@DanGould DanGould commented Jan 5, 2024

This commit displays templates based on a particular ResponseError
and debugs the rest, according to this specification.

The receiver is allowed to return implementation specific errors which
may assist the sender to diagnose any issue.

However, it is important that error codes that are not well-known and
that the message do not appear on the sender's software user interface.
Such error codes or messages could be used maliciously to phish a non-
technical user. Instead those errors or messages can only appear in
debug logs.

It is advised to hard code the description of the well known error
codes into the sender's software.

See:
https://github.com/bitcoin/bips/blob/master/bip-0078.mediawiki#receivers-well-known-errors

result:
image

@DanGould DanGould force-pushed the pj-response-errors branch 5 times, most recently from e2a168c to 6ba4da0 Compare January 5, 2024 21:20
@DanGould DanGould marked this pull request as ready for review January 5, 2024 21:21
@benthecarman
Copy link
Collaborator

needs rebase

@DanGould DanGould force-pushed the pj-response-errors branch from 6ba4da0 to 18e23cf Compare January 6, 2024 17:43
@DanGould DanGould mentioned this pull request Jan 6, 2024
@DanGould
Copy link
Contributor Author

DanGould commented Jan 8, 2024

I'm not sure why these platform-specific errors are happening in CI after rebase since they don't seem to relate to my changes. @benthecarman any hints?

@benthecarman
Copy link
Collaborator

Maybe just try rebasing? seems like a spurious failure

"The receiver is allowed to return implementation specific errors which
may assist the sender to diagnose any issue.

However, it is important that error codes that are not well-known and
that the message do not appear on the sender's software user interface.
Such error codes or messages could be used maliciously to phish a non-
technical user. Instead those errors or messages can only appear in
debug logs.

It is advised to hard code the description of the well known error
codes into the sender's software."

See:
https://github.com/bitcoin/bips/blob/master/bip-0078.mediawiki#receivers-well-known-errors

This commit displays templates based on a particular \`ResponseError\`
and debugs the rest, according to this specification.
@DanGould
Copy link
Contributor Author

yep it was spurious

@benthecarman benthecarman merged commit dbca043 into MutinyWallet:master Jan 11, 2024
9 checks passed
@DanGould DanGould deleted the pj-response-errors branch January 12, 2024 06:08
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.

2 participants