Skip to content

Commit b2d1c7e

Browse files
committed
fix: enhance error handling in deployment polling and update docutils versioning
1 parent 6b28f5d commit b2d1c7e

File tree

2 files changed

+45
-26
lines changed

2 files changed

+45
-26
lines changed

riocli/deployment/util.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,13 @@ def poll_deployment(
112112
deployment = client.get_deployment(name=name)
113113
status = deployment.status
114114

115-
if status is not None and hasattr(status, "error_codes"):
116-
pass
115+
error_codes = getattr(status, "error_codes", []) if status else []
117116
msg = (
118117
f"Retries exhausted: Tried {retry_count} times with {sleep_interval}s interval. "
119-
f"Deployment: phase={status.phase} status={status.status} \n"
120-
f"{process_errors(status.error_codes or [])}"
118+
f"Deployment: phase={status.phase if status else 'Unknown'} "
119+
f"status={status.status if status else 'Unknown'}"
121120
)
121+
if error_codes:
122+
msg += f"\n{process_errors(error_codes)}"
123+
122124
raise RetriesExhausted(msg)

uv.lock

Lines changed: 39 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)