Open aljones15 opened 1 year ago
I agree with most of what you're saying here, but I'm not sure if introducing too many DID method-specific errors (such as invalidDidKeyVersion
) is very smart. This can become complicated for both resolvers and clients if you want to support multiple DID methods.
We could also make use of other metadata properties. E.g. a resolver could return a generic invalidDid
or notFound
error that every client understand, but in the metadata we could include additional information WHY it was invalid or not found, etc.
The following normative statement causes issues with the definition of
invalidDid
from did-coreThe definition of
invalidDid
is:The following statements should not raise
invalidDid
The following is a valid did that breaks these rules:
did:sov:staging:PiEVD2uU2qKEQ5oxx1BJ6A
I suggest adding a new error
invalidDidKey
for when something is a valid did, but not a validdid:key
. We could make these more specific such as:methodNotSupported
invalidDidKeyMultibasePrefix
invalidDidKeyVersion
Also of note: the normative statement
The method MUST be the value key
conflicts with thedid-resolver spec
We could solve this issue by using the error code fromdid resolution
methodNotSupported