lance-format / lance-format/lance

feat(namespace): preserve Retry-After metadata on ThrottlingError

Open
#9,113 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-namespace enhancement feature good first issue
Dominant language
Rust
Stars
7.1k
Forks
852
Avg merge
3d 18h
Merged PRs (30d)
272

Description

Problem

A Lance Namespace REST server return a standard throttling response:

HTTP/1.1 429 Too Many Requests
Retry-After: 2

with the official Namespace error code 21 (THROTTLING).

However, the current REST Namespace client discards response headers while converting an HTTP response into a Namespace error. Callers only receive ThrottlingError with its message and error code; they cannot access Retry-After, the HTTP status, or other response metadata.

This prevents SDK and application layers from implementing server-directed retry, queuing, or throttling coordination.

Current behavior

The REST request path in rust/lance-namespace-impls/src/rest.rs receives a reqwest::Response, reads the error body, and maps its Namespace error code to an error type.

Response headers are not preserved during this conversion. Consequently, Python callers can catch:

except lance_namespace.errors.ThrottlingError as error:
    ...

but cannot determine whether:

  • the server provided a retry delay;
  • the throttling is temporary;
  • the server returned a 429 without Retry-After, such as for a zero-quota or permanently restricted API key.

Expected behavior

ThrottlingError should optionally expose normalized retry metadata from the HTTP response.

Suggested cross-language shape:

ThrottlingError:
  retry_after: optional duration

For Python, this could be exposed as:

error.retry_after  # str | None

or add a common field to save response headers

LanceNamespaceError:
  response_headers: Option<Map<String, String>>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in rust/lance-namespace-impls/src/rest.rs, where reqwest::Response errors are converted into Namespace error types, and trace how ThrottlingError reaches Python callers. Done means callers can access optional normalized retry metadata for responses with and without Retry-After, while preserving the existing error code and message behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.