lancedb / lancedb/lancedb

Feature: add ability to filter errors for `createEmptyTable` and probably other API

Open
#2,214 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
11.5k
Forks
1.1k
Avg merge
1d 15h
Merged PRs (30d)
140

Description

### SDK

Node

### Description

Side note: I'm aware of [existOk](https://lancedb.github.io/lancedb/guides/tables/#from-list-of-tuples-or-dictionaries) config option.

## Problem

Currently, when running `connect(config).createEmptyTable("example-name")`, if a table with such name already exists, the following error is thrown:

```sh
[Error: Table 'example-name' already exists] {
code: 'GenericFailure'
}
```

`GenericFailure` isn't a unique error code.
So a user is required to filter errors by error messages, which is inefficient, inconvenient, and error prone.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Node SDK's createEmptyTable entry point and how the GenericFailure error is exposed to callers. Check whether related API operations use the same error path. Done means callers can distinguish an existing-table failure without matching the error message, with the intended behavior covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.