Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- `ManagedDatabaseClient.fetch_table` now carries the `X-Database-Id` scope header on the result poll, the query-run poll, and the Arrow fetch — not only on the query submit. Results of database-scoped queries are themselves database-scoped, so every read against an existing synced table (merge/append loads, dlt state restore) failed with `400: Bad Request` once the table had data (dlthubworker#70).
- `ManagedDatabaseClient.fetch_table` now carries the `X-Database-Id` scope header on the result poll, the query-run poll, and the Arrow fetch — not only on the query submit. Results of database-scoped queries are themselves database-scoped, so every read against an existing synced table (merge/append loads, dlt state restore) failed with `400: Bad Request` once the table had data.
- API error messages now include the response body (flattened, truncated to 500 chars). `400: Bad Request` alone hid the server's actual explanation.

### Changed
Expand Down
3 changes: 1 addition & 2 deletions tests/test_errors.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"""Error message construction: the API's response body must survive.

"400: Bad Request" alone is undebuggable; the body carries the server's
actual explanation (e.g. which header was missing). Regression for the
opaque load failures in dlthubworker#70.
actual explanation (e.g. which header was missing).
"""

from __future__ import annotations
Expand Down
3 changes: 1 addition & 2 deletions tests/test_managed_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ def test_fetch_table_carries_database_scope_on_result_reads(
hotdata 0.6.0 SDK exposes ``x_database_id`` on all three.

Regression: reruns/append loads against an existing synced table failed
with an opaque ``400: Bad Request`` (dlthubworker#70) because both reads
omitted the scope.
with an opaque ``400: Bad Request`` because both reads omitted the scope.
"""
result_scopes: list[str | None] = []
arrow_scopes: list[str | None] = []
Expand Down
Loading