From 26af97df42193582995ba73da1798115edfb4410 Mon Sep 17 00:00:00 2001 From: wizardchen Date: Tue, 1 Sep 2026 11:16:29 +0800 Subject: [PATCH] fix: check JWKS response body close for errcheck --- internal/application/service/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/application/service/user.go b/internal/application/service/user.go index 37bd6921..9dc86c34 100644 --- a/internal/application/service/user.go +++ b/internal/application/service/user.go @@ -1817,7 +1817,7 @@ func (s *userService) fetchOIDCJWKS(ctx context.Context, jwksURI string) (*oidcJ if err != nil { return nil, err } - defer resp.Body.Close() + defer func() { _ = resp.Body.Close() }() if resp.StatusCode < 200 || resp.StatusCode >= 300 { _, _ = io.Copy(io.Discard, io.LimitReader(resp.Body, 2048)) return nil, fmt.Errorf("JWKS request failed: status=%d", resp.StatusCode)