did-resolution icon indicating copy to clipboard operation
did-resolution copied to clipboard

Define invalidResolutionOptions error

Open wip-abramson opened this issue 8 months ago • 5 comments

I believe we should add a invalidResolutionOptions error.

The specific case I am thinking of is when someone attempts to resolve a DID with both versionId and versionTime specified. These are intended to be mutually exclusive per the spec. Although that is currently only stated in section 12 - https://w3c.github.io/did-resolution/#versioning. Perhaps this should also be added to the definitions of these options.

As DID methods define and use other options this error could also apply.

wip-abramson avatar Apr 02 '25 11:04 wip-abramson

I agree, this seems useful.

peacekeeper avatar Apr 02 '25 14:04 peacekeeper

Wondering if this should be generalized. to INVALID_OPTIONS or INVALID_RESOLVER_OPTIONS.

This would the cover the dereferencing options too. Or we could add two errors. One for INVALID_DEREFERENCING_OPTIONS?

wip-abramson avatar Apr 24 '25 13:04 wip-abramson

I don't have a strong opinion on this. I think a single error INVALID_OPTIONS would be fine.

peacekeeper avatar Apr 24 '25 15:04 peacekeeper

Yep, I tend to agree. Updated PR #146 to include this option.

wip-abramson avatar Apr 28 '25 19:04 wip-abramson

This has been addressed by https://github.com/w3c/did-resolution/pull/146

peacekeeper avatar May 29 '25 10:05 peacekeeper