Open peacekeeper opened 2 years ago
I actually agree with you here and think that invalidDid
should only be used for dids that don't meet the requirements from did core. There is an issue on the spec itself about this: https://github.com/w3c-ccg/did-method-key/issues/60
I think invalidDidKey
would be a better error.
I see that one of the tests is:
I have been assuming so far that the
invalidDid
error would be returned only if the DID doesn't conform to the generic DID Core syntax. So if you try to resolvedid:key:12345
, the error would actually benotFound
, since the DID does conform to the generic DID Core syntax, but the method-specific ID "12345" doesn't exist within thedid:key
method.But maybe my assumption was wrong. I also understand the rationale that
invalidDid
would cover not only the generic DID Core syntax, but also method-specific syntax requirements (starting withz
, in this case). So, just opening this issue to talk about it. We could define this in more detail in the DID Resolution spec: https://w3c-ccg.github.io/did-resolution/#errors