From 1c24dc221fbeda928417692d900d72b9f3ab684d Mon Sep 17 00:00:00 2001 From: mkelvers Date: Sat, 20 Jun 2026 18:29:04 +0200 Subject: [PATCH] Handle watch order response close errors --- integrations/watchorder/watch_order.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/integrations/watchorder/watch_order.go b/integrations/watchorder/watch_order.go index 7671b09..7dff395 100644 --- a/integrations/watchorder/watch_order.go +++ b/integrations/watchorder/watch_order.go @@ -6,6 +6,7 @@ import ( "errors" "fmt" "io" + "mal/pkg/errlog" netutil "mal/pkg/net" "net/http" "regexp" @@ -205,7 +206,9 @@ func fetchProxyText(ctx context.Context, httpClient *http.Client, url string) (s if err != nil { return "", fmt.Errorf("proxy request failed: %w", err) } - defer func() { _ = response.Body.Close() }() + defer func() { + errlog.Log("failed to close watch order proxy response body", response.Body.Close()) + }() if response.StatusCode != http.StatusOK { return "", fmt.Errorf("proxy status %d", response.StatusCode)