Rename EncapsulationError to DecapsulationError#1601
Merged
Merged
Conversation
The send v2 EncapsulationError type is a misnomer: it is only raised while decapsulating directory responses in process_response, never during request encapsulation, which returns CreateRequestError. Rename the public struct, the internal InternalEncapsulationError enum, and the InternalValidationError::V2Encapsulation variant, and mirror the change through the payjoin-ffi sender error surface. This is a pure rename with no behavior change. The unrelated OhttpEncapsulationError type is correctly named and is left untouched. Addresses the misnomer flagged in payjoin#749.
4 tasks
Collaborator
Coverage Report for CI Build 26946455484Coverage remained the same at 85.358%Details
Uncovered Changes
Coverage Regressions1 previously-covered line in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The send-v2 EncapsulationError is a misnomer: it's only raised while decapsulating directory responses in
process_response, never during request encapsulation (that's CreateRequestError). Renames the public struct,
InternalEncapsulationError, InternalValidationError::V2Encapsulation, and the payjoin-ffi sender surface → Decapsulation*. Pure rename, no behavior change; doc-prose aligned. OhttpEncapsulationError left untouched. The user-facing "v2 encapsulation error"
Display string intentionally unchanged.
Why — Fix naming before the 1.0 error-type lock in & addresses the misnomer in #749; related to #403.
Reviewer note #403 fix PR is stacked on this so merge this first.
Disclosure: co-authored by Claude Code
Pull Request Checklist
Please confirm the following before requesting review:
AI
in the body of this PR.