<#1135 fix: include exception type in upload retry...
# flyte-github
a
#1135 fix: include exception type in upload retry error when str(e) is empty Pull request opened by EngHabu Summary
httpx.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:
Copy code
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-sdk