Skip to content

Commit 976964f

Browse files
committed
fix: error messages arent supposed to end in puncuation I guess
1 parent 3f3dabe commit 976964f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

client/rest/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ func (s *restClient) send(req *http.Request) (*http.Response, error) {
240240
// Try the request
241241
if res, err = s.http.Do(req); err != nil {
242242
if IsClosedConnectionErr(err) {
243-
fmt.Printf("remote host force closed connection while requesting %s; attempt %d/%d; trying again...\n", req.URL, retry+1, maxRetries)
243+
fmt.Printf("remote host force closed connection while requesting %s; attempt %d/%d; trying again\n", req.URL, retry+1, maxRetries)
244244
ExponentialBackoff(retry)
245245
continue
246246
}

cmd/start.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ func ingest(ctx context.Context, bheUrl url.URL, bheClient *http.Client, in <-ch
220220
if response, err := bheClient.Do(req); err != nil {
221221
if rest.IsClosedConnectionErr(err) {
222222
// 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)
224224
rest.ExponentialBackoff(retry)
225225

226226
if retry == maxRetries-1 {
@@ -233,8 +233,8 @@ func ingest(ctx context.Context, bheUrl url.URL, bheClient *http.Client, in <-ch
233233
log.Error(err, unrecoverableErrMsg)
234234
return true
235235
} 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, "")
238238

239239
rest.ExponentialBackoff(retry)
240240

@@ -288,7 +288,7 @@ func do(bheClient *http.Client, req *http.Request) (*http.Response, error) {
288288
if res, err = bheClient.Do(req); err != nil {
289289
if rest.IsClosedConnectionErr(err) {
290290
// 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)
292292
rest.ExponentialBackoff(retry)
293293
continue
294294
}
@@ -298,7 +298,7 @@ func do(bheClient *http.Client, req *http.Request) (*http.Response, error) {
298298
if res.StatusCode >= http.StatusInternalServerError {
299299
// Internal server error, backoff and try again.
300300
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)
302302

303303
rest.ExponentialBackoff(retry)
304304
continue

0 commit comments

Comments
 (0)