Skip to content

Commit

Permalink
fix: resolver empty did doc
Browse files Browse the repository at this point in the history
Signed-off-by: tipusinghaw <tipu.singh@ayanworks.com>
  • Loading branch information
tipusinghaw committed Feb 9, 2024
1 parent 16ac899 commit 9a99086
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ export function getResolver(): Record<string, DIDResolver> {
)

if (!didDocument[0]) {
throw new Error(`The DID document for the given DID was not found!`)
return {
didDocument: null,
didDocumentMetadata: {},
didResolutionMetadata: {
error: `NotFound!`,
message: `resolver_error: Unable to resolve did '${did}'`,
},
}
}
const didDocumentJson = JSON.parse(didDocument[0])

Expand Down

0 comments on commit 9a99086

Please sign in to comment.