acoustic-carpenter-78188
06/01/2026, 4:16 PMhttpx.ReadError() (and a few other httpx/httpcore exceptions) carry an empty str(e). The retry exhaustion message in flyte/remote/_data.py::_upload_with_retry interpolates the exception directly, so the error reaching Sentry looks like:
RuntimeSystemError: Failed to upload /tmp/.../fast....tar.gz after 3 retries:
…a bare trailing colon with no cause. That's not actionable from a Sentry report.
Fix
Capture last_error as f"{type(e).__name__}: {e}" (or just the type name when str(e) is empty), so the exhaustion message always carries an identifiable cause.
Closes
• FLYTE-SDK-36 — Failed to upload ... after 3 retries: (empty cause).
fixes FLYTE-SDK-36
Test plan
• Added test_upload_error_message_includes_type_when_empty — passing httpx.ReadError("") causes the wrapped RuntimeSystemError to include "ReadError" and to NOT end with a bare "retries:".
• Existing tests in tests/flyte/remote/test_upload_retry.py still pass.
• make fmt clean.
🤖 Generated with Claude Code
flyteorg/flyte-sdkacoustic-carpenter-78188
06/03/2026, 2:06 PM