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

Remove the numerical error codes to be in sync with the VCDM specification #327

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2366,7 +2366,7 @@ <h3>Processing Errors</h3>
The algorithms described in this specification, as well as in various cryptographic
suite specifications, throw specific types of errors. Implementers might find
it useful to convey these errors to other libraries or software systems. This
section provides specific URLs, descriptions, and error codes for the errors,
section provides specific URLs and descriptions for the errors,
such that an ecosystem implementing technologies described by this
specification might interoperate more effectively when errors occur.
</p>
Expand All @@ -2384,38 +2384,34 @@ <h3>Processing Errors</h3>
below.
</li>
<li>
The `code` value MUST be the integer code described in the table below
(in parentheses, beside the type name).
</li>
<li>
The `title` value SHOULD provide a short but specific human-readable [=string=] for
The `title` value MUST be present and SHOULD provide a short but specific human-readable [=string=] for
Copy link
Contributor

Choose a reason for hiding this comment

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

This should match what's in the other specs and not add a new MUST: https://w3c.github.io/vc-bitstring-status-list/#processing-errors

Suggested change
The `title` value MUST be present and SHOULD provide a short but specific human-readable [=string=] for
The `title` value SHOULD provide a short but specific human-readable [=string=] for

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, actually... I have added the "MUST be present and" statement exactly to be consistent with the VCDM spec, see https://www.w3.org/TR/vc-data-model-2.0/#problem-details

I do not really care either way, we have to decide whether we align with the VCDM or we align the VCDM with this...

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, I think we should align the VCDM with this more flexible approach (no MUSTs) that is also closer to the RFC.

Copy link
Member Author

Choose a reason for hiding this comment

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

I am neutral on this. But this should be a decision of the WG, probably to be discussed on a call.

@brentzundel

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, looks like we have a consistency mismatch between VCDM, DI, and BSL :(. VCDM says each property MUST be present (this language). DI and BSL say SHOULD. RFC9457 says SHOULD as well.

I think we were trying to make the error messages useful by using MUST for certain properties existing (type, title, and detail). I still think that's a good idea, that is -- if you are going to raise an error, you MUST include at least those properties for the error to be immediately useful for a developer).

Let's discuss during the next WG call.

Copy link
Contributor

@dlongley dlongley Jan 13, 2025

Choose a reason for hiding this comment

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

I think we were trying to make the error messages useful by using MUST for certain properties existing (type, title, and detail).

The type property is a MUST everywhere (in all the specs already) and should stay that way. It's only the properties that are advisory from the RFC (e.g., title and detail) that I believe should be SHOULDs. I think only type is really necessary for interoperability and is what software should be using to make any branching decisions. But, these other fields are useful for developers -- and the fact that they are will drive whether or not they are included, i.e., the SHOULD provides flexibility but systems will probably include them for the best DX without us having to demand it for interop, which doesn't make sense, IMO.

the error.
</li>
<li>
The `detail` value SHOULD provide a longer human-readable [=string=] for the error.
The `detail` value MUST be present and SHOULD provide a longer human-readable [=string=] for the error.
Copy link
Contributor

Choose a reason for hiding this comment

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

This should match what's in the other specs and not add a new MUST: https://w3c.github.io/vc-bitstring-status-list/#processing-errors

Suggested change
The `detail` value MUST be present and SHOULD provide a longer human-readable [=string=] for the error.
The `detail` value SHOULD provide a longer human-readable [=string=] for the error.

Copy link
Member Author

Choose a reason for hiding this comment

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

See my comment above

Copy link
Member

Choose a reason for hiding this comment

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

</li>
</ul>

<dl>
<dt id="PROOF_GENERATION_ERROR">PROOF_GENERATION_ERROR (-16)</dt>
<dt id="PROOF_GENERATION_ERROR">PROOF_GENERATION_ERROR</dt>
<dd>
A request to generate a proof failed. See Section [[[#add-proof]]], and Section
[[[#add-proof-set-chain]]].
</dd>
<dt id="PROOF_VERIFICATION_ERROR">PROOF_VERIFICATION_ERROR (-17)</dt>
<dt id="PROOF_VERIFICATION_ERROR">PROOF_VERIFICATION_ERROR</dt>
<dd>
An error was encountered during proof verification. See Section [[[#verify-proof]]].
</dd>
<dt id="PROOF_TRANSFORMATION_ERROR">PROOF_TRANSFORMATION_ERROR (-18)</dt>
<dt id="PROOF_TRANSFORMATION_ERROR">PROOF_TRANSFORMATION_ERROR </dt>
<dd>
An error was encountered during the transformation process.
</dd>
<dt id="INVALID_DOMAIN_ERROR">INVALID_DOMAIN_ERROR (-19)</dt>
<dt id="INVALID_DOMAIN_ERROR">INVALID_DOMAIN_ERROR</dt>
<dd>
The `domain` value in a proof did not match the expected value. See Section
[[[#verify-proof]]].
</dd>
<dt id="INVALID_CHALLENGE_ERROR">INVALID_CHALLENGE_ERROR (-20)</dt>
<dt id="INVALID_CHALLENGE_ERROR">INVALID_CHALLENGE_ERROR</dt>
<dd>
The `challenge` value in a proof did not match the expected value. See Section
[[[#verify-proof]]].
Expand Down
36 changes: 18 additions & 18 deletions vocab/security/vocabulary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -481,62 +481,62 @@ property:
individual:
- id: PROOF_GENERATION_ERROR
type: sec:ProcessingError
label: Proof generation error (-16)
label: Proof generation error
defined_by: https://www.w3.org/TR/vc-data-integrity/#PROOF_GENERATION_ERROR
context: none

- id: PROOF_VERIFICATION_ERROR
type: sec:ProcessingError
label: Malformed proof (-17)
label: Malformed proof
defined_by: https://www.w3.org/TR/vc-data-integrity/#PROOF_VERIFICATION_ERROR
context: none

- id: PROOF_TRANSFORMATION_ERROR
type: sec:ProcessingError
label: Mismatched proof purpose (-18)
label: Mismatched proof purpose
defined_by: https://www.w3.org/TR/vc-data-integrity/#PROOF_TRANSFORMATION_ERROR
context: none

- id: INVALID_DOMAIN_ERROR
type: sec:ProcessingError
label: Invalid proof domain (-19)
label: Invalid proof domain
defined_by: https://www.w3.org/TR/vc-data-integrity/#INVALID_DOMAIN_ERROR
context: none

- id: INVALID_CHALLENGE_ERROR
type: sec:ProcessingError
label: Invalid challenge (-20)
label: Invalid challenge
defined_by: https://www.w3.org/TR/vc-data-integrity/#INVALID_CHALLENGE_ERROR
context: none

- id: INVALID_VERIFICATION_METHOD_URL
type: sec:ProcessingError
label: Invalid verification method URL (-21)
defined_by: https://www.w3.org/TR/vc-data-integrity/#INVALID_VERIFICATION_METHOD_URL
label: Invalid verification method URL
defined_by: https://www.w3.org/TR/cid-1.0/#INVALID_VERIFICATION_METHOD_URL
context: none

- id: INVALID_CONTROLLER_DOCUMENT_ID
- id: INVALID_CONTROLLED_IDENTIFIER_DOCUMENT_ID
type: sec:ProcessingError
label: Invalid controller document id (-22)
defined_by: https://www.w3.org/TR/vc-data-integrity/#INVALID_CONTROLLER_DOCUMENT_ID
label: Invalid controlled identifier document id
defined_by: https://www.w3.org/TR/cid-1.0/#INVALID_CONTROLLED_IDENTIFIER_DOCUMENT_ID
context: none

- id: INVALID_CONTROLLER_DOCUMENT
- id: INVALID_CONTROLLED_IDENTIFIER_DOCUMENT
type: sec:ProcessingError
label: Invalid controller document (-23)
defined_by: https://www.w3.org/TR/vc-data-integrity/#INVALID_CONTROLLER_DOCUMENT
label: Invalid controlled identifier document
defined_by: https://www.w3.org/TR/cid-1.0/#INVALID_CONTROLLED_IDENTIFIER_DOCUMENT
context: none

- id: INVALID_VERIFICATION_METHOD
type: sec:ProcessingError
label: Invalid verification method (-24)
defined_by: https://www.w3.org/TR/vc-data-integrity/#INVALID_VERIFICATION_METHOD
label: Invalid verification method
defined_by: https://www.w3.org/TR/cid-1.0/#INVALID_VERIFICATION_METHOD
context: none

- id: INVALID_PROOF_PURPOSE_FOR_VERIFICATION_METHOD
- id: INVALID_RELATIONSHIP_FOR_VERIFICATION_METHOD
type: sec:ProcessingError
label: Invalid proof purpose for verification method (-25)
defined_by: https://www.w3.org/TR/vc-data-integrity/#INVALID_PROOF_PURPOSE_FOR_VERIFICATION_METHOD
label: Invalid relationship for verification method
defined_by: https://www.w3.org/TR/cid-1.0/#INVALID_RELATIONSHIP_FOR_VERIFICATION_METHOD
context: none

datatype:
Expand Down
Loading