generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve error message returned when attempting to resolve did:dht
DID that hasn't yet been published. Currently a bit misleading.
#312
Labels
did:dht
did:dht
Comments
This is a result of attempting to fetch the DID before it has published, which takes about 10 seconds. The error can be better but I wouldn't classify it as a bug. |
mistermoe
changed the title
Improve error message returned when attempting to resolve Nov 23, 2023
did:dht
resolution failsdid:dht
DID that hasn't yet been published. Currently a bit misleading.
kk thanks! this works: const sleep = (time) => new Promise(resolve => setTimeout(resolve, time));
const did = await DidDhtMethod.create({ publish: true });
await sleep(10_000);
const didResolutionResult = await DidDhtMethod.resolve({ didUrl: did.did }); agree that it's not a bug and agree that the error message could be better. removed the bug label and updated the github issue description to reflect |
Merged
Merged
frankhinek
added a commit
that referenced
this issue
Dec 6, 2023
This PR primarily addresses Issue #312 by improving the error handling when attempting to resolve a did:dht DID that hasn't yet been published. Additionally, it modifies the key set handling to better align with the original intent and other existing DID method implementations. This was necessary to support the forthcoming switch to did:dht as the default DID for @web5/api package. Lastly it approves test coverage for the DID DHT related code.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hitting the following error when attempting to resolve
did:dht
DIDs:code:
error:
Update
After talking to @decentralgabe , realized that this was happening because the DID hadn't yet been published. publishing requires passing
publish: true
toDidDhtMetod.create
and waiting for ~10s. Better error message and some documentation could be helpful (though not clear where we should put those docs cc: @angiejones @ALRubinger @leordev)The text was updated successfully, but these errors were encountered: