-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat(nameguard-sdk): throw errors from API #396
base: main
Are you sure you want to change the base?
feat(nameguard-sdk): throw errors from API #396
Conversation
🦋 Changeset detectedLatest commit: 538dc75 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this 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 👍
@@ -698,7 +778,9 @@ export class NameGuard { | |||
options?: SecurePrimaryNameOptions, | |||
): Promise<SecurePrimaryNameResult> { |
There was a problem hiding this comment.
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.
There was a problem hiding this 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 👍
packages/nameguard-sdk/src/index.ts
Outdated
try { | ||
const timeoutId = setTimeout(() => { | ||
this.abortController.abort(); | ||
}, 30000); // 30 second timeout |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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;
nameguard-react