fix: avoid retrying remote branch deletions (#4854)

This commit is contained in:
lancedb-gatefixer[bot]
2026-11-05 13:20:20 -08:00
committed by GitHub
parent a2abfbced7
commit 0d72977186
5 changed files with 154 additions and 3 deletions
+10 -2
View File
@@ -813,8 +813,8 @@ so the fetch APIs cannot read their bytes yet.
## Exceptions
Remote HTTP responses with structured resource details raise a subclass of
`HttpError`. Older servers that omit those details raise plain `HttpError`, so
`except HttpError` remains a compatible catch-all:
`HttpError`. Older servers that omit those details generally raise plain
`HttpError`, so `except HttpError` remains a compatible catch-all:
```python
from lancedb.remote.errors import (
@@ -835,6 +835,12 @@ except HttpError as error:
print("request failed:", error.request_id, error.status_code)
```
Remote branch deletion sends a single request. If the server rejects it with
HTTP 409, it raises `ConflictError` with the server's reason, including when an
older server omits structured resource details. A structured `already_exists`
response keeps its more specific `AlreadyExistsError` type. Both are subclasses
of `HttpError`.
SQL response failures raise `SqlError`, retaining the numeric `grpc_code` and
`request_id`. Servers that report a recognized `x-lancedb-error-code` select a
specific input-error subclass. HTTP failures use the corresponding `HttpError`
@@ -900,6 +906,8 @@ generic HTTP/SQL exceptions with their transport status and current request ID.
::: lancedb.remote.errors.AlreadyExistsError
::: lancedb.remote.errors.ConflictError
::: lancedb.exceptions.MissingValueError
::: lancedb.exceptions.MissingColumnError