diff --git a/internal/runtime/executor/logging_helpers.go b/internal/runtime/executor/logging_helpers.go index 4e86f3a8..26931f53 100644 --- a/internal/runtime/executor/logging_helpers.go +++ b/internal/runtime/executor/logging_helpers.go @@ -323,7 +323,14 @@ func formatAuthInfo(info upstreamRequestLog) string { } func summarizeErrorBody(contentType string, body []byte) string { - if strings.Contains(strings.ToLower(contentType), "text/html") { + isHTML := strings.Contains(strings.ToLower(contentType), "text/html") + if !isHTML { + trimmed := bytes.TrimSpace(bytes.ToLower(body)) + if bytes.HasPrefix(trimmed, []byte("