Skip to content

Make beforeError hook receive all errors#829

Merged
sindresorhus merged 3 commits intomainfrom
beforeerror-all
Feb 27, 2026
Merged

Make beforeError hook receive all errors#829
sindresorhus merged 3 commits intomainfrom
beforeerror-all

Conversation

@sindresorhus
Copy link
Copy Markdown
Owner

@sindresorhus sindresorhus commented Feb 23, 2026

Also add KyError base class that HTTPError, TimeoutError, and ForceRetryError extend to make it easier to detect ky-specific errors.

See #762 (comment)

Fixes #508

And add `KyError` base class that `HTTPError`, `TimeoutError`, and `ForceRetryError` extend to make it easier to detect ky-specific errors.
@sindresorhus sindresorhus merged commit 101c74b into main Feb 27, 2026
6 checks passed
@sindresorhus sindresorhus deleted the beforeerror-all branch February 27, 2026 10:05
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.

Pass TimeoutErrors to beforeError hooks

1 participant