From 3afd7c26e53c50e125408e58103c843706fb367e Mon Sep 17 00:00:00 2001 From: jla Date: Sat, 7 Feb 2026 22:28:51 -0500 Subject: [PATCH] Fix: Remove JSON quotes from webhook JSONPath string extraction --- service/internal/webhooks/jsonpath.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/service/internal/webhooks/jsonpath.go b/service/internal/webhooks/jsonpath.go index 8e51b70..bfeac08 100644 --- a/service/internal/webhooks/jsonpath.go +++ b/service/internal/webhooks/jsonpath.go @@ -46,7 +46,12 @@ func (m *JSONMatcher) ExtractValue(pathExpr string) (string, error) { return "", err } - // Marshal to JSON for consistent string representation + // For string values, return directly without marshaling to avoid adding JSON quotes + if strValue, ok := value.(string); ok { + return strValue, nil + } + + // For non-string values, marshal to JSON for consistent string representation jsonBytes, err := json.Marshal(value) if err != nil { return "", fmt.Errorf("failed to marshal extracted value: %w", err)