w3c / vc-data-integrity

W3C Data Integrity Specification
https://w3c.github.io/vc-data-integrity/
Other
39 stars 17 forks source link

Error code update and consolidation #274

Closed Wind4Greg closed 2 weeks ago

Wind4Greg commented 3 weeks ago

This PR is in response to issues https://github.com/w3c/vc-di-eddsa/issues/82, https://github.com/w3c/vc-di-ecdsa/issues/63, and https://github.com/w3c/vc-di-bbs/issues/168. It aims to unify error handling across cryptosuite specification by reusing a consistent set of error codes from this data integrity specification. It does this by making sure that there are general error code categories for three main classes of errors: (1) proof generation errors, (2) proof verification errors, and (3) proof transformation errors.

In particular this PR generalizes MALFORMED_PROOF_ERROR to PROOF_VERIFICATION_ERROR.; subsumes MISMATCHED_PROOF_PURPOSE_ERROR into PROOF_VERIFICATION_ERROR; and adds PROOF_TRANSFORMATION_ERROR.

Analysis of error codes from issue https://github.com/w3c/vc-di-eddsa/issues/82:

Error Codes in Data Integrity Spec and Suggestions

Would not change any of the following:


Preview | Diff

Wind4Greg commented 3 weeks ago

Thanks @iherman. Also is there a special way that the cryptosuite specifications should be referencing these error codes? i.e., using links or other special ReSpec notation? I didn't have any examples in the EdDSA, ECDSA, or BBS cryptosuites to guide me. Cheers Greg

iherman commented 3 weeks ago

Thanks @iherman. Also is there a special way that the cryptosuite specifications should be referencing these error codes? i.e., using links or other special ReSpec notation? I didn't have any examples in the EdDSA, ECDSA, or BBS cryptosuites to guide me. Cheers Greg

I guess something like this should work:


<a data-cite="VC-DATA-INTEGRITY#MALFORMED_PROOF_ERROR">MALFORMED_PROOF_ERROR</a>

should work.

cc @msporny

msporny commented 2 weeks ago

Normative, multiple reviews, no changes requested, no objections, merging.