Skip to content

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

@rafaelcr

Description

@rafaelcr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions