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

Error classes are not exposed #4

Closed
arty-name opened this issue May 20, 2019 · 3 comments · Fixed by #5
Closed

Error classes are not exposed #4

arty-name opened this issue May 20, 2019 · 3 comments · Fixed by #5

Comments

@arty-name
Copy link
Contributor

The error classes HTTPError and TimeoutError seem to be inaccessible through ky-universal. It only re-exports the default export of ky/umd, not these classes. Following workaround can only be found by inspecting the source code:

const { HTTPError, TimeoutError } = require('ky/umd')

I think it is reasonable to expect following to work:

const { HTTPError, TimeoutError } = require('ky-universal')

Would you accept a PR implementing this?

@sindresorhus
Copy link
Owner

Just an oversight. PR welcome.

@arty-name
Copy link
Contributor Author

Here you go!

@arty-name
Copy link
Contributor Author

Thanks!

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 a pull request may close this issue.

2 participants