digitalbazaar / did-io

Decentralized identifier management library for browser and node.js
Other
43 stars 8 forks source link

Proper handling of unknown DIDs #26

Closed mattcollier closed 6 years ago

mattcollier commented 6 years ago

https://github.com/digitalbazaar/did-io/blob/b850abb95d6232be307537bd9a6351c6a9238a87/lib/methods/veres-one/client.js#L86

I'm dealing with a negative test in bedrock-ledger-validator-signature where the DID does not exist for a mock key 'did:v1:777ea7ad-ab68-4039-b85b-a45a795b2d93/keys/1'

I'm using v0.7.0 against genesis.testnet.veres.one, is that proper?

What seems to be happening is that the request for L86 is returning an empty document which leds to:

TypeError: Cannot read property '@context' of undefined
    at VeresOneClient.get (/home/matt/dev/bedrock-dev/bedrock-ledger-validator-signature/test/node_modules/did-io/lib/methods/veres-one/client.js:86:27)
    at process._tickCallback (internal/process/next_tick.js:68:7)
dmitrizagidulin commented 6 years ago

I'm using v0.7.0 against genesis.testnet.veres.one, is that proper?

Yes, that's right.

@mattcollier great catch, thanks! Will fix.

dmitrizagidulin commented 6 years ago

@mattcollier - this should be fixed by https://github.com/digitalbazaar/web-ledger-client/pull/1