Skip to content

Conversation

@notrab
Copy link
Member

@notrab notrab commented Sep 11, 2024

Earlier this year we discussed the idea of adding different error types to the SDK for timeouts, lost connection, server errors and input validation.

This PR starts the conversation about adding such support.

Please note;

  1. There is no changeset, I need to do the other end of this to update nameguard-react

@changeset-bot
Copy link

changeset-bot bot commented Sep 11, 2024

🦋 Changeset detected

Latest commit: 538dc75

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@namehash/nameguard Minor
@namehash/nameguard-js Patch
@namehash/nameguard-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Sep 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples.nameguard.io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 10, 2024 8:09am
nameguard.io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 10, 2024 8:09am
namehashlabs.org 🛑 Canceled (Inspect) Oct 10, 2024 8:09am
storybook.namekit.io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 10, 2024 8:09am

Copy link
Member

@lightwalker-eth lightwalker-eth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@notrab Thanks for updates. Reviewed and shared feedback 👍

public async getSecurePrimaryName(
address: string,
options?: SecurePrimaryNameOptions,
): Promise<SecurePrimaryNameResult> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also check the nameguard-js package and see if there's anything there that needs to be updated. NameGuard JS implements a subclass of the NameGuard class.

Copy link
Member

@lightwalker-eth lightwalker-eth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@notrab Hey just saw your updated comments here. Reviewed and shared feedback 👍

try {
const timeoutId = setTimeout(() => {
this.abortController.abort();
}, 30000); // 30 second timeout
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could make this configurable if we need.

I think we could attach timeout to the signal instead from looking at this page. I need to test it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added this to the constructor now.

@vercel vercel bot temporarily deployed to Preview – namehashlabs.org October 10, 2024 08:00 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants