mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-13 14:16:54 +00:00
fix: avoid retrying remote branch deletions (#4854)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user