Skip to content

Commit 10bf99e

Browse files
committed
fix(flagd): Update retryable status codes in retry logic
Signed-off-by: Guido Breitenhuber <[email protected]>
1 parent f2092b9 commit 10bf99e

File tree

1 file changed

+4
-18
lines changed
  • providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/resolver/common

1 file changed

+4
-18
lines changed

providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/resolver/common/ChannelBuilder.java

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -59,26 +59,12 @@ public class ChannelBuilder {
5959
"retryableStatusCodes",
6060
Arrays.asList(
6161
/*
62-
* All codes are retryable except OK and DEADLINE_EXCEEDED since
63-
* any others not listed here cause a very tight loop of retries.
64-
* DEADLINE_EXCEEDED is typically a result of a client specified deadline,
65-
* and definitionally should not result in a tight loop (it's a timeout).
62+
* Only states UNAVAILABLE and UNKNOWN should be retried. All
63+
* other failure states will probably not be resolved with a simple retry.
6664
*/
67-
Code.CANCELLED.toString(),
68-
Code.UNKNOWN.toString(),
69-
Code.INVALID_ARGUMENT.toString(),
70-
Code.NOT_FOUND.toString(),
71-
Code.ALREADY_EXISTS.toString(),
72-
Code.PERMISSION_DENIED.toString(),
73-
Code.RESOURCE_EXHAUSTED.toString(),
74-
Code.FAILED_PRECONDITION.toString(),
75-
Code.ABORTED.toString(),
76-
Code.OUT_OF_RANGE.toString(),
77-
Code.UNIMPLEMENTED.toString(),
78-
Code.INTERNAL.toString(),
7965
Code.UNAVAILABLE.toString(),
80-
Code.DATA_LOSS.toString(),
81-
Code.UNAUTHENTICATED.toString()));
66+
Code.UNKNOWN.toString())
67+
);
8268
}
8369
});
8470
}

0 commit comments

Comments
 (0)