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

fix: correct support for AbortSignal:timeout() #2388

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

katsanva
Copy link
Contributor

@katsanva katsanva commented Nov 2, 2024

See #2371

This changes the rejected value to TimeotError when AbortSignal:timeout() is initially aborted.

As stated in docs:

The signal will abort with its AbortSignal.reason property set to a TimeoutError DOMException on timeout, or an AbortError DOMException if the operation was user-triggered.

Checklist

  • I have read the documentation.
  • I have included a pull request description of my changes.
  • I have included some tests.
  • If it's a new feature, I have included documentation updates in both the README and the types.

@katsanva katsanva changed the title fix: correct support AbortSignal:timeout() (refs sindresorhus/got/2371) fix: correct support for AbortSignal:timeout() Nov 2, 2024
test/abort.ts Outdated Show resolved Hide resolved
@sindresorhus sindresorhus merged commit 92b378e into sindresorhus:main Nov 4, 2024
1 check passed
@tal-rofe98
Copy link

@sindresorhus
This should have been marked as breaking change..

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