Repository navigation
DCQL: keep the verifier's error in the failure message - #42
Draft
scott410md wants to merge 1 commit into
Draft
scott410md wants to merge 1 commit into
scott410md wants to merge 1 commit into
Conversation
When a presentation or credential fails verification and the verifier returns an error text in its result payload (for example a status list result), the failure line now ends with ": <error>", so a failed presentation record says why. Without an error text the line is unchanged. Signed-off-by: Scott Harris <82886769+scott410md@users.noreply.github.com>
Collaborator
Author
|
Companion proven-core PR (stores these errors with the presentation): https://github.com/Indicio-tech/proven-core/pull/528 |
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.
What it does
When a presentation or a credential fails verification during DCQL evaluation, the record's errors get a failure line such as:
If the verifier's result payload carries an
"error"text (for example a status list result), that line now ends with": <error>":The same applies to the
Credential for <credential id> failed verificationline.The line is unchanged when there is no error text: no
"error"key, an empty or non-string value, or a payload that is not a dict.Why
A failed presentation record says why it failed. Callers that show a reason to a user, for example a verifier dashboard, can show the verifier's own text instead of a generic failure.
Scope
oid4vc/oid4vc/dcql.pyonly. A small helper,_with_verifier_error, is used for the presentation and credential failure lines.Tests
There are six new cases in
oid4vc/oid4vc/tests/test_dcql.py. They use mocked verifiers and check the failure line for:": <error>");Results on this branch:
pytest oid4vc/tests/test_dcql.py: 9 passed (3 existing, 6 new).pytest jwt_vc_json mso_mdoc oid4vc sd_jwt_vc: 313 passed (307 on the base commit, plus the 6 new cases), 0 failed.ruff checkandruff format --check(ruff 0.15.7, repository configuration) on both files: clean.Companion change in proven-core (stores these errors with the presentation) will follow as a separate draft PR on main-2.0.