nuts-foundation / nuts-foundation/nuts-node
PEX: Inconsistent error/return values depending on which requirements aren't met
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 28
- Forks
- 23
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 76
Description
PresentationDefinition.Match() returns:
- no error and no VCs when
InputDescriptorconstraints aren't met - an error when submission requirements aren't met (e.g.: Presentation Definition with 2
InputDescriptors, 1 for JSON-LD, 1 for JWT, pick 1)
Both situations are functionally valid flows, and should not yield a (hard) error. But the caller might still want to have details on what failed to match (e.g. format). Maybe we should return a special error type for matching failures (not errors, e.g. invalid definition), which can be tested with errors.As (or Is), which also contains detailed information?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with PresentationDefinition.Match() and compare its behavior when InputDescriptor constraints fail with behavior when submission requirements fail. Done should mean both valid non-matches avoid a hard error while still exposing enough failure detail for callers to inspect.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100