-
Notifications
You must be signed in to change notification settings - Fork 19
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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> | ||||||
|
@@ -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 | ||||||
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. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See my comment above There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See comment here: https://github.com/w3c/vc-data-integrity/pull/327/files#r1912460821 |
||||||
</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]]]. | ||||||
|
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
, anddetail
). 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
anddetail
) that I believe should be SHOULDs. I think onlytype
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.