-
Notifications
You must be signed in to change notification settings - Fork 11
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
Unify Error Handling #82
Comments
Analysis: PROOF_TRANSFORMATION_ERROR and INVALID_PROOF_CONFIGURATION are thrown under the same condition but from two different places and used consistently here and in the ECDSA spec. MALFORMED_PROOF_ERROR really should be a PROOF_TRANSFORMATION_ERROR for consistency with the rest of the document. Recommend adding PROOF_TRANSFORMATION_ERROR, INVALID_PROOF_CONFIGURATION, and INVALID_PROOF_DATETIME errors to the VC-DI specification since they are used in this spec, ECDSA, and BBS specs.
|
These strike me as the same kind of error -- and that the difference in error code isn't very helpful. They are really about the wrong configuration / proof information, not about transformation. They might both fit under
This seems like another I would expect that either we would have very specific error codes for every possible field that could be malformed (requiring us to add something like The other quoted lines also seem to be |
@dlongley I like the idea of a big category for all these errors too. Both on generation and verification side. |
https://w3c.github.io/vc-data-integrity/#MALFORMED_PROOF_ERROR |
@dlongley That's great! If we can get a bit more feedback. I'd be happy to roll out the PRs. |
Hi @dlongley and @msporny based on some off line conversations it may be difficult to reduce all the previously discussed to a "MALFORMED_PROOF_ERROR". The transformation process occurs during proof generation and verification and in two of the specs (EdDSA and ECDSA) the actual procedure is reused. Hence for general categories of errors that match the overall DI processing model we could have: PROOF_TRANSFORMATION_ERROR, PROOF_GENERATION_ERROR, and PROOF_VERIFICATION_ERROR. See below for proposed update to DI spec errors and how they could be used in the cryptosuite specs. Error Codes in Data Integrity Spec and Suggestions
Would not change any of the following:
|
PR w3c/vc-data-integrity#274 and #84 were raised to address this issue, and have been merged, closing. |
Similar to issue w3c/vc-di-ecdsa#63. To unify error handling language across this specification and other cryptosuite specifications I'd recommend:
Below I show codes used but not in the DI specification. I didn't find any error conditions without codes that should have them. Thoughts/Opinions?
Error Codes Used but Not in DI Spec
Error codes: PROOF_TRANSFORMATION_ERROR, INVALID_PROOF_CONFIGURATION, INVALID_PROOF_DATETIME, MALFORMED_PROOF_ERROR,
DataIntegrityProof
and options.cryptosuite is not set to the stringeddsa-rdfc-2022
then aPROOF_TRANSFORMATION_ERROR
MUST be raised." In section Transformation (eddsa-rdfc-2022).DataIntegrityProof
and proofConfig.cryptosuite is not set toeddsa-rdfc-2022
, anINVALID_PROOF_CONFIGURATION
error MUST be raised."INVALID_PROOF_DATETIME
error MUST be raised."DataIntegrityProof
and options.cryptosuite is not set to the stringeddsa-jcs-2022
then an error MUST be raised that SHOULD use theMALFORMED_PROOF_ERROR
error code."DataIntegrityProof
and proofConfig.cryptosuite is not set toeddsa-jcs-2022
, anINVALID_PROOF_CONFIGURATION
error MUST be raised."INVALID_PROOF_DATETIME
error MUST be raised."Ed25519Signature2020
, then aPROOF_TRANSFORMATION_ERROR
MUST be raised."Ed25519Signature2020
, anINVALID_PROOF_CONFIGURATION
error MUST be raised."INVALID_PROOF_DATETIME
error MUST be raised."The text was updated successfully, but these errors were encountered: