fix: handle errcheck for Rows.Close and resp.Body.Close in sora code

This commit is contained in:
erio committed 2026-03-10 18:16:58 +08:00
1 parent 7b3df5b807
commit a4fdc1dc4b
2 files changed
+2 -2

No files matched your search

@@ -379,7 +379,7 @@ func (s *SoraTaskService) forwardGetToUpstream(
if err != nil {
return nil, fmt.Errorf("upstream request: %w", err)
}
defer resp.Body.Close()
defer func() { _ = resp.Body.Close() }()
respBody, err := io.ReadAll(io.LimitReader(resp.Body, 256*1024))
if err != nil {