linting
This commit is contained in:
@@ -49,7 +49,11 @@ func SendAPIRequest(ctx context.Context, logger mlogger.Logger, httpMethod api.H
|
||||
logger.Warn("Failed to execute request", zap.Error(err), zap.String("method", method), zap.String("url", url), zap.Any("payload", payload))
|
||||
return err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
defer func() {
|
||||
if closeErr := resp.Body.Close(); closeErr != nil {
|
||||
logger.Warn("Failed to close response body", zap.Error(closeErr), zap.String("method", method), zap.String("url", url))
|
||||
}
|
||||
}()
|
||||
|
||||
// Read the sresponse body
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
|
||||
Reference in New Issue
Block a user