From 693df549385746f9193c649c51ea9e90ee7d636a Mon Sep 17 00:00:00 2001 From: "Joseph T. French" Date: Tue, 29 Sep 2026 21:29:04 -0500 Subject: [PATCH] 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 --- robosystems_client/clients/file_client.py | 2 +- tests/test_file_client.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/robosystems_client/clients/file_client.py b/robosystems_client/clients/file_client.py index ecfe427..8dca59f 100644 --- a/robosystems_client/clients/file_client.py +++ b/robosystems_client/clients/file_client.py @@ -239,7 +239,7 @@ def upload( table_name=table_name, file_name=file_name, success=False, - error="Failed to complete file upload", + error=f"Failed to complete file upload: {update_response.status_code}", ) # Extract staging metadata from the operation envelope result. Large files diff --git a/tests/test_file_client.py b/tests/test_file_client.py index 6aa4cf6..5f97259 100644 --- a/tests/test_file_client.py +++ b/tests/test_file_client.py @@ -236,7 +236,7 @@ def test_upload_status_update_failure( result = client.upload(graph_id, "Entity", BytesIO(b"data")) assert result.success is False - assert "Failed to complete file upload" in result.error + assert result.error == "Failed to complete file upload: 500" def test_upload_no_token(self, mock_config, graph_id): """Test upload fails without API key."""