feat: complete T-528 cmhub billing feedback

This commit is contained in:
chengma
2026-07-04 17:14:29 +08:00
parent 27f23a4738
commit 3dbcbab799
7 changed files with 377 additions and 20 deletions
+9
View File
@@ -1082,6 +1082,15 @@ def _emit_generation_error(callback, task, phase, step, exc, error):
"error": diagnostics.redact_log_text(error),
"exception": exc,
}
code = getattr(exc, "code", None)
status = getattr(exc, "status", None)
retryable = getattr(exc, "retryable", None)
if code is not None:
payload["code"] = str(code)
if status is not None:
payload["status"] = status
if retryable is not None:
payload["retryable"] = bool(retryable)
try:
callback(payload)
except Exception: