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

Type of onError hook's argument is not correct #175

Open
harunorimurata opened this issue Apr 22, 2021 · 0 comments
Open

Type of onError hook's argument is not correct #175

harunorimurata opened this issue Apr 22, 2021 · 0 comments

Comments

@harunorimurata
Copy link
Contributor

ky.HTTPError doesn't have statusCode.

onError(hook: (error: ky.HTTPError) => void): void

The correct type of this is ky.HTTPError & { statusCode?: number }.
Please check the code and document below.

Source code:

error.statusCode = error.response.status

Document:
if (error.statusCode === 500) {

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

No branches or pull requests

1 participant