w3c / did-resolution

RELEASED DRAFT: Decentralized Identifier Resolution (DID Resolution) 0.2 Specification
https://w3c.github.io/did-resolution/
Other
14 stars 9 forks source link

Add did key errors to spec. #71

Closed aljones15 closed 1 year ago

aljones15 commented 1 year ago

Adds errors from the did key spec to the did resolution.

Errors added:

peacekeeper commented 1 year ago

The only issue I see is that "invalidDidUrl" is already defined in DID Core, so either we don't define it here in DID Resolution, OR we include all DID Core errors also in DID Resolution (and potentially add more details).

aljones15 commented 1 year ago

@peacekeeper the existing did core errors are actually kind of small, so I think we should add them to this section with more specific instructions on when to throw. We should link back to did core so it is known those errors are did core and not specific to did key or did resolution. That is my idea, but consensus could vary. @msporny ideas here?

Maybe something like like:

If an invalid did url is detected add the invalidDidUrl error defined in did-core to the didResolutionMetadata or didDereferencingMetadata.

peacekeeper commented 1 year ago

I think we should add them to this section with more specific instructions on when to throw.

I agree this would be a good idea. Do you want to add that now, or later? Maybe first merge this PR here? (why is it still draft?)

aljones15 commented 1 year ago

I think we should add them to this section with more specific instructions on when to throw.

I agree this would be a good idea. Do you want to add that now, or later? Maybe first merge this PR here? (why is it still draft?)

Sorry about the delay, but I got massively delayed last week by some more pressing stuff. I will add the did-core stuff today.

aljones15 commented 1 year ago

@peacekeeper ok this commit https://github.com/w3c-ccg/did-resolution/pull/71/commits/2e9ab47e953952486aef052411e146560755ae95

adds the did-core refs and also adds notFound to the error section. I did not add representationNotSupported as there are no statements explaining how that error is thrown in did resolution (it's defined in did-core), it's just assumed that when dereferencing a did url it is returned as an error.

peacekeeper commented 1 year ago

@aljones15 I merged this, and note that I added a few other commits on top of it: