Skip to content

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
@katsanva katsanva requested a review from sindresorhus November 3, 2024 11:11
@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