Skip to content

Commit 8f5f869

Browse files
committed
fix
1 parent 2068b0f commit 8f5f869

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • aws/logs_monitoring_go/internal/config

aws/logs_monitoring_go/internal/config/apikey.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ func (c *Config) validateAPIKey() error {
115115
time.Sleep(retryBackoffFactor * time.Duration(1<<attempt))
116116
continue
117117
}
118-
resp.Body.Close()
118+
if err := resp.Body.Close(); err != nil {
119+
slog.Debug("failed to close response body", "error", err)
120+
}
119121

120122
if resp.StatusCode >= 200 && resp.StatusCode < 300 {
121123
slog.Debug("API key validated successfully")

0 commit comments

Comments
 (0)