Skip to content

Commit

Permalink
Unify error codes and error handling language.
Browse files Browse the repository at this point in the history
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Manu Sporny <msporny@digitalbazaar.com>
3 people authored Jun 30, 2024
1 parent 0fa95aa commit 9a15210
Showing 1 changed file with 27 additions and 13 deletions.
40 changes: 27 additions & 13 deletions index.html
Original file line number Diff line number Diff line change
@@ -632,8 +632,9 @@ <h4>Transformation (eddsa-rdfc-2022)</h4>
<li>
If <var>options</var>.<var>type</var> is not set to the string
`DataIntegrityProof` and <var>options</var>.<var>cryptosuite</var> is not
set to the string `eddsa-rdfc-2022` then a `PROOF_TRANSFORMATION_ERROR` MUST be
raised.
set to the string `eddsa-rdfc-2022` then an error MUST be raised and SHOULD
convey an error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_TRANSFORMATION_ERROR">PROOF_TRANSFORMATION_ERROR</a>.
</li>
<li>
Let |canonicalDocument| be the result of converting |unsecuredDocument|
@@ -724,13 +725,16 @@ <h4>Proof Configuration (eddsa-rdfc-2022)</h4>
</li>
<li>
If <var>options</var>.<var>type</var> is not set to `DataIntegrityProof` and
<var>proofConfig</var>.<var>cryptosuite</var> is not set to `eddsa-rdfc-2022`, an
`INVALID_PROOF_CONFIGURATION` error MUST be raised.
<var>proofConfig</var>.<var>cryptosuite</var> is not set to `eddsa-rdfc-2022`,
an error MUST be raised and SHOULD convey an error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_GENERATION_ERROR">PROOF_GENERATION_ERROR</a>.
</li>
<li>
Set <var>proofConfig</var>.<var>created</var> to
<var>options</var>.<var>created</var>. If the value is not a valid
[[XMLSCHEMA11-2]] datetime, an `INVALID_PROOF_DATETIME` error MUST be raised.
[[XMLSCHEMA11-2]] datetime,
an error MUST be raised and SHOULD convey an error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_GENERATION_ERROR">PROOF_GENERATION_ERROR</a>.
</li>
<li>
Set <var>proofConfig</var>.<var>verificationMethod</var> to
@@ -1006,7 +1010,9 @@ <h4>Transformation (eddsa-jcs-2022)</h4>
If <var>options</var>.<var>type</var> is not set to the string
`DataIntegrityProof` and <var>options</var>.<var>cryptosuite</var> is not
set to the string `eddsa-jcs-2022` then an error MUST be raised that
SHOULD use the `MALFORMED_PROOF_ERROR` error code.
SHOULD use the
<a data-cite="VC-DATA-INTEGRITY#PROOF_VERIFICATION_ERROR">PROOF_VERIFICATION_ERROR</a>
error code.
</li>
<li>
Let <var>canonicalDocument</var> be the result of applying the
@@ -1085,13 +1091,16 @@ <h4>Proof Configuration (eddsa-jcs-2022)</h4>
</li>
<li>
If <var>options</var>.<var>type</var> is not set to `DataIntegrityProof` and
<var>proofConfig</var>.<var>cryptosuite</var> is not set to `eddsa-jcs-2022`, an
`INVALID_PROOF_CONFIGURATION` error MUST be raised.
<var>proofConfig</var>.<var>cryptosuite</var> is not set to `eddsa-jcs-2022`,
an error MUST be raised and SHOULD convey an error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_GENERATION_ERROR">PROOF_GENERATION_ERROR</a>.
</li>
<li>
Set <var>proofConfig</var>.<var>created</var> to
<var>options</var>.<var>created</var>. If the value is not a valid
[[XMLSCHEMA11-2]] datetime, an `INVALID_PROOF_DATETIME` error MUST be raised.
[[XMLSCHEMA11-2]] datetime,
an error MUST be raised and SHOULD convey an error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_GENERATION_ERROR">PROOF_GENERATION_ERROR</a>.
</li>
<li>
Set <var>proofConfig</var>.<var>verificationMethod</var> to
@@ -2017,7 +2026,9 @@ <h4>Transformation (Ed25519Signature2020)</h4>
<ol class="algorithm">
<li>
If <var>options</var>.<var>type</var> is not set to the string
`Ed25519Signature2020`, then a `PROOF_TRANSFORMATION_ERROR` MUST be raised.
`Ed25519Signature2020`, an error MUST be raised and SHOULD convey an error
type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_TRANSFORMATION_ERROR">PROOF_TRANSFORMATION_ERROR</a>.
</li>
<li>
Let |canonicalDocument| be the result of converting |unsecuredDocument|
@@ -2112,13 +2123,16 @@ <h4>Proof Configuration (Ed25519Signature2020)</h4>
<var>proofConfig</var>.<var>cryptosuite</var> to its value.
</li>
<li>
If <var>options</var>.<var>type</var> is not set to `Ed25519Signature2020`, an
`INVALID_PROOF_CONFIGURATION` error MUST be raised.
If <var>options</var>.<var>type</var> is not set to `Ed25519Signature2020`,
an error MUST be raised and SHOULD convey an error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_GENERATION_ERROR">PROOF_GENERATION_ERROR</a>.
</li>
<li>
Set <var>proofConfig</var>.<var>created</var> to
<var>options</var>.<var>created</var>. If the value is not a valid
[[XMLSCHEMA11-2]] datetime, an `INVALID_PROOF_DATETIME` error MUST be raised.
[[XMLSCHEMA11-2]] datetime, an error MUST be raised and SHOULD convey an
error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_GENERATION_ERROR">PROOF_GENERATION_ERROR</a>.
</li>
<li>
Set <var>proofConfig</var>.<var>verificationMethod</var> to

0 comments on commit 9a15210

Please sign in to comment.