ssi icon indicating copy to clipboard operation
ssi copied to clipboard

Improve parse errors

Open clehner opened this issue 3 years ago • 0 comments

Parsing nonconformant VCs, VPs, or other inputs should result in errors that help the caller fix the input.

For example, for a credential with invalid subject id, instead of "data did not match any variant of untagged enum OneOrMany at line 1 column 470", something like this would be better:

  • Credential subject ID must be a URI
  • Expected URI in credential subject ID
  • credentialSubject: id: expected URI

Exceptions would be if there is a security concern, like if the error is returned to an untrusted party, or a conformance reason, like error strings required to have specific values as in DID Resolution.

This may require manually implementing serialize for types.

clehner avatar Apr 16 '21 17:04 clehner