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."""