@@ -220,7 +220,7 @@ func ingest(ctx context.Context, bheUrl url.URL, bheClient *http.Client, in <-ch
220
220
if response , err := bheClient .Do (req ); err != nil {
221
221
if rest .IsClosedConnectionErr (err ) {
222
222
// try again on force closed connection
223
- log .Error (err , "remote host force closed connection while requesting %s; attempt %d/%d; trying again... " , req .URL , retry + 1 , maxRetries )
223
+ log .Error (err , "remote host force closed connection while requesting %s; attempt %d/%d; trying again" , req .URL , retry + 1 , maxRetries )
224
224
rest .ExponentialBackoff (retry )
225
225
226
226
if retry == maxRetries - 1 {
@@ -233,8 +233,8 @@ func ingest(ctx context.Context, bheUrl url.URL, bheClient *http.Client, in <-ch
233
233
log .Error (err , unrecoverableErrMsg )
234
234
return true
235
235
} else if response .StatusCode == http .StatusGatewayTimeout || response .StatusCode == http .StatusServiceUnavailable || response .StatusCode == http .StatusBadGateway {
236
- serverError := fmt .Errorf ("received server error %d while requesting %v;" , response .StatusCode , endpoint )
237
- log .Error (serverError , "attempt %d/%d; trying again..." , retry + 1 , maxRetries )
236
+ serverError := fmt .Errorf ("received server error %d while requesting %v; attempt %d/%d; trying again " , response .StatusCode , endpoint , retry + 1 , maxRetries )
237
+ log .Error (serverError , "" )
238
238
239
239
rest .ExponentialBackoff (retry )
240
240
@@ -288,7 +288,7 @@ func do(bheClient *http.Client, req *http.Request) (*http.Response, error) {
288
288
if res , err = bheClient .Do (req ); err != nil {
289
289
if rest .IsClosedConnectionErr (err ) {
290
290
// try again on force closed connections
291
- log .Error (err , "remote host force closed connection while requesting %s; attempt %d/%d; trying again... " , req .URL , retry + 1 , maxRetries )
291
+ log .Error (err , "remote host force closed connection while requesting %s; attempt %d/%d; trying again" , req .URL , retry + 1 , maxRetries )
292
292
rest .ExponentialBackoff (retry )
293
293
continue
294
294
}
@@ -298,7 +298,7 @@ func do(bheClient *http.Client, req *http.Request) (*http.Response, error) {
298
298
if res .StatusCode >= http .StatusInternalServerError {
299
299
// Internal server error, backoff and try again.
300
300
serverError := fmt .Errorf ("received server error %d while requesting %v" , res .StatusCode , req .URL )
301
- log .Error (serverError , "attempt %d/%d; trying again... " , retry + 1 , maxRetries )
301
+ log .Error (serverError , "attempt %d/%d; trying again" , retry + 1 , maxRetries )
302
302
303
303
rest .ExponentialBackoff (retry )
304
304
continue
0 commit comments