summaryrefslogtreecommitdiff
path: root/internal/discovery/discovery.go
diff options
context:
space:
mode:
authorJeroen Wijenbergh <jeroen.wijenbergh@geant.org>2026-02-19 10:10:17 +0100
committerJeroen Wijenbergh <jeroen.wijenbergh@geant.org>2026-02-20 12:19:17 +0100
commit8907c4f33e2309244a89c5a342a0e9ad393d5cb1 (patch)
treed3a5be7bfdd098a93c54af2aebc11ec492f38aae /internal/discovery/discovery.go
parentffb0d31a4a6fca2af3dc6680c4d1afa9e225f88c (diff)
All: Log HTTP body when JSON unmarshal fails
Fixes: #112
Diffstat (limited to 'internal/discovery/discovery.go')
-rw-r--r--internal/discovery/discovery.go2
1 files changed, 1 insertions, 1 deletions
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