Skip to content

Unclassifiable "aborted" errors from tarn #1837

Description

@erehulka

mssql uses tarn for pooling. When a pending acquire is aborted (e.g. pool teardown), tarn rejects with a plain Error('aborted'). Timeouts use TimeoutError, which is easy to detect with instanceof. Aborts are not, so callers must match message or stack traces to tell “shutting down / aborted wait” from real DB or network failures.

Upstream, a tarn change was proposed (TarnError, aborts using it, optionally TimeoutError extends it). Tarn looks unmaintained, so we should not assume that lands.

Request

Please either:

  1. In mssql: rethrow/wrap these pool errors in some own error type, so we can catch and classify them without parsing the error message (message === 'aborted'); or
  2. Longer term: consider another maintained pool package (or internal pooling) that exposes explicit error types. We need a stable way to handle teardown without treating aborted acquires like ordinary query failures.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions