Skip to content

[Bug]: oxlint preserve-caught-error violation in memory-lancedb blocks all PR CI #11060

@leszekszpunar

Description

@leszekszpunar

Summary

A lint violation (preserve-caught-error) in extensions/memory-lancedb/index.ts:35 on main causes the lint CI check to fail on every open PR, regardless of the PR's own changes. Currently 9 out of 11 failing PRs are blocked solely by this issue.

Repro

pnpm build && pnpm lint

Output includes:

eslint(preserve-caught-error): There is no cause error attached to this new thrown error.
  extensions/memory-lancedb/index.ts:35:5
    throw new Error(`memory-lancedb: failed to load LanceDB. ${String(err)}`);
  help: Preserve the original error by using the `cause` property when re-throwing errors.

Root Cause

The loadLanceDB() function catches an error and re-throws a new Error with the message stringified, but discards the original error object. The preserve-caught-error oxlint rule requires the original error to be chained via { cause: err }.

Impact

Every PR that includes extensions/memory-lancedb/index.ts in its lint scope (which is all PRs running pnpm lint) fails CI on both Linux and Windows runners. Currently blocking PRs: #11001, #11009, #11026, #11027, #11028, #11033, #11046 (and partially #11032, #11035).

Fix

One-line change: add { cause: err } to the Error constructor on line 35.

lobster-biscuit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions