Skip to content

Commit

Permalink
Do not retry after receiving 429 http error
Browse files Browse the repository at this point in the history
Fast fail on 429, allowing clients to determine how to handle these
errors.
  • Loading branch information
Seth Terashima authored and sethterashima committed May 20, 2024
1 parent 7bfff28 commit fb2b85f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/connector/inet/inet.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ func (e *HttpError) Temporary() bool {
return e.Code == http.StatusServiceUnavailable ||
e.Code == http.StatusGatewayTimeout ||
e.Code == http.StatusRequestTimeout ||
e.Code == http.StatusMisdirectedRequest ||
e.Code == http.StatusTooManyRequests
e.Code == http.StatusMisdirectedRequest
}

func SendFleetAPICommand(ctx context.Context, client *http.Client, userAgent, authHeader string, url string, command interface{}) ([]byte, error) {
Expand Down

0 comments on commit fb2b85f

Please sign in to comment.