ssi
ssi copied to clipboard
DID Resolution Error consistency
In DID resolution and DID URL dereferencing we are sometimes returning descriptive error strings in the ResolutionMetadata
and DereferencingMetadata
structs. But according to DID Core, the value of the error
property "MUST be a single keyword ASCII string." and "possible property values of this field SHOULD be registered in the DID Specification Registries". So we should not be returning descriptive error strings, but instead prefer returning the codes listed in DID Core or DID Specification Registries only. The type of the error field could even be an enum
, although that would be a breaking change.
In places where the meaning of the error is uncertain (e.g. it is returned from another function) or there is useful information in the error that would be lost by mapping it to a single value, we could possibly add the message in an additional error property: at least one other implementation is using an errorMessage
property for this purpose, as seen in the DID Test Suite.