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

[types] some error type definitions are stale or missing #1883

Closed
rafaelcr opened this issue Jan 25, 2023 · 2 comments · Fixed by #1888
Closed

[types] some error type definitions are stale or missing #1883

rafaelcr opened this issue Jan 25, 2023 · 2 comments · Fixed by #1888
Labels
bug Something isn't working

Comments

@rafaelcr
Copy link
Contributor

Bug Description

The undici error types provided here do not correspond to all errors declared here.

Reproducible By

A couple of examples:

  • The ConnectTimeoutError is not available in the errors type definitions
  • Using SocketTimeoutError in a type check like
    if (error instanceof errors.SocketTimeoutError)
    produces an right-hand side of 'instanceof' is not an object error.

Expected Behavior

All core error types are defined.

Environment

macOS 13.1, node v18.5.0

@rafaelcr rafaelcr added the bug Something isn't working label Jan 25, 2023
@KhafraDev
Copy link
Member

Would you like to send in a PR to add them in?

@rafaelcr
Copy link
Contributor Author

Sure @KhafraDev ... I'll send one your way asap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants