Skip to content

Commit

Permalink
add identifier to pkarr error for debugging purposes (#508)
Browse files Browse the repository at this point in the history
* add identifier to pkarr error for debugging purposes

* add changeset
  • Loading branch information
LiranCohen authored May 2, 2024
1 parent d863c37 commit d3814cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tall-mugs-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@web5/dids": patch
---

We sometimes get failures in CI publishing to the DHT. In order to make debugging these errors easier, we add the identifier to the error thrown.
2 changes: 1 addition & 1 deletion packages/dids/src/methods/did-dht.ts
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ export class DidDhtDocument {
});

} catch (error: any) {
throw new DidError(DidErrorCode.InternalError, `Failed to put Pkarr record: ${error.message}`);
throw new DidError(DidErrorCode.InternalError, `Failed to put Pkarr record for identifier ${identifier}: ${error.message}`);
}

// Return `true` if the DHT request was successful, otherwise return `false`.
Expand Down

0 comments on commit d3814cd

Please sign in to comment.