Skip to content

Commit 693df54

Browse files
committed
fix(files): report the status code when ingest-file fails
A failed ingest returned "Failed to complete file upload" with no status, while a failed upload-URL request already reports its code. Callers that retry on a 429 could not tell a rate-limited ingest from any other failure, so a rate-limited load failed instead of backing off. Claude-Session: https://claude.ai/code/session_018kncpCo1113kH9HrBC8GYy
1 parent 464eaca commit 693df54

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎robosystems_client/clients/file_client.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def upload(
239239
table_name=table_name,
240240
file_name=file_name,
241241
success=False,
242-
error="Failed to complete file upload",
242+
error=f"Failed to complete file upload: {update_response.status_code}",
243243
)
244244

245245
# Extract staging metadata from the operation envelope result. Large files

‎tests/test_file_client.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def test_upload_status_update_failure(
236236
result = client.upload(graph_id, "Entity", BytesIO(b"data"))
237237

238238
assert result.success is False
239-
assert "Failed to complete file upload" in result.error
239+
assert result.error == "Failed to complete file upload: 500"
240240

241241
def test_upload_no_token(self, mock_config, graph_id):
242242
"""Test upload fails without API key."""

0 commit comments

Comments
 (0)