From 8907c4f33e2309244a89c5a342a0e9ad393d5cb1 Mon Sep 17 00:00:00 2001 From: Jeroen Wijenbergh Date: Thu, 19 Feb 2026 10:10:17 +0100 Subject: All: Log HTTP body when JSON unmarshal fails Fixes: #112 --- internal/discovery/discovery.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/discovery') diff --git a/internal/discovery/discovery.go b/internal/discovery/discovery.go index cde846c..93b5f4e 100644 --- a/internal/discovery/discovery.go +++ b/internal/discovery/discovery.go @@ -169,7 +169,7 @@ func (discovery *Discovery) file(ctx context.Context, jsonFile string, previousV // Parse JSON to extract version and list if err = json.Unmarshal(body, structure); err != nil { - return newUpdate, fmt.Errorf("failed parsing discovery file: '%s' from the server with error: %w", jsonFile, err) + return newUpdate, fmt.Errorf("failed parsing discovery file: '%s' from the server with error: %w and body: %s", jsonFile, err, string(body)) } return newUpdate, nil -- cgit v1.2.3