Skip to content

Commit

Permalink
adding 408 - Request Timeout to list of retryable status codes (knati…
Browse files Browse the repository at this point in the history
…ve-extensions#2160) (#256)

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

Co-authored-by: Matthias Wessendorf <mwessend@redhat.com>
  • Loading branch information
openshift-cherrypick-robot and matzew committed May 10, 2022
1 parent 400cef5 commit 729b111
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ static boolean isRetryableStatusCode(final int statusCode) {
// From https://github.com/knative/specs/blob/c348f501de9eb998b4fd010c54d9127033ee41be/specs/eventing/data-plane.md#event-acknowledgement-and-delivery-retry
return statusCode >= 500 || // Generic error
statusCode == 404 || // Endpoint does not exist
statusCode == 408 || // Request Timeout
statusCode == 409 || // Conflict / Processing in progress
statusCode == 429; // Too Many Requests / Overloaded
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static Stream<Integer> nonRetryableStatusCodes() {
return Stream.concat(
Stream.concat(
IntStream.range(200, 404).boxed(),
IntStream.range(405, 409).boxed()
IntStream.range(405, 408).boxed()
),
Stream.concat(
IntStream.range(410, 429).boxed(),
Expand All @@ -89,7 +89,7 @@ public static Stream<Integer> nonRetryableStatusCodes() {
public static Stream<Integer> retryableStatusCodes() {
return Stream.concat(
IntStream.range(500, 600).boxed(),
IntStream.of(404, 409, 429).boxed()
IntStream.of(404, 408, 409, 429).boxed()
);
}
}

0 comments on commit 729b111

Please sign in to comment.