Skip to content

Commit 7757dfe

Browse files
committed
add logging to non-rate limit 4xx responses
Signed-off-by: Eric Pickard <piceri@github.com>
1 parent 3ed17e1 commit 7757dfe

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

pkg/deploymentrecord/client.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,11 @@ func (c *Client) postWithRetry(ctx context.Context, targetURL string, body []byt
372372
continue
373373
}
374374
// Don't retry non rate limiting client errors
375+
slog.Warn("client error, aborting",
376+
"attempt", attempt,
377+
"status_code", resp.StatusCode,
378+
"resp_msg", string(respBody),
379+
)
375380
return nil, resp.StatusCode, &ClientError{err: fmt.Errorf("unexpected client err with status code %d", resp.StatusCode)}
376381
default:
377382
// Retry with backoff

0 commit comments

Comments
 (0)