Skip to content
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

Fetch-timeout #269

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Fetch-timeout #269

wants to merge 3 commits into from

Conversation

cre8
Copy link
Contributor

@cre8 cre8 commented Jan 15, 2025

Set the newer version of the abort signal, also add a test for it

Addressing the discussion from #267

Signed-off-by: Mirko Mollik [email protected]

cre8 added 3 commits January 15, 2025 13:53
Signed-off-by: Mirko Mollik <[email protected]>
Signed-off-by: Mirko Mollik <[email protected]>
@@ -187,12 +180,10 @@ export class SDJwtVcInstance extends SDJwtInstance<SdJwtVcPayload> {
await this.validateIntegrity(response.clone(), url, integrity);
return response.json() as Promise<T>;
} catch (error) {
if (error instanceof DOMException && error.name === 'AbortError') {
if (error instanceof DOMException && error.name === 'TimeoutError') {
Copy link
Member

Choose a reason for hiding this comment

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

Is the DOMException okay for other platform? RN or nodejs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ran the test with as browser and as node (provided by the package file). In both cases I got a TimeoutError.

As mentioned I don't have a RN setup so I am unable to test it. A quick check of the react native github repo assumes that it should work.

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.

2 participants