diff --git a/tools/thothctl/internal/workspaceops/operations.go b/tools/thothctl/internal/workspaceops/operations.go index 8a2ca241..082a5b2e 100644 --- a/tools/thothctl/internal/workspaceops/operations.go +++ b/tools/thothctl/internal/workspaceops/operations.go @@ -218,6 +218,15 @@ type OperationError struct { } func (e *OperationError) Error() string { + detail := strings.TrimSpace(e.detail) + if len(detail) > 0 { + // Bounded, sanitized operator/container detail so operators can diagnose failures + // without leaking secrets; the full renderer sanitizes further before output. + if len(detail) > 2048 { + detail = detail[:2048] + } + return fmt.Sprintf("stage=%s class=%s: %s", e.stage, e.class, detail) + } return fmt.Sprintf("stage=%s class=%s", e.stage, e.class) }