From 28af5ac60775aaa1778737c0858f53e0cd7d22bf Mon Sep 17 00:00:00 2001 From: James Watkins-Harvey Date: Fri, 17 Oct 2025 11:52:05 -0400 Subject: [PATCH 1/2] Add CONFLICT and REQUEST_TIMEOUT handler error types --- .../java/io/nexusrpc/handler/HandlerException.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/nexus-sdk/src/main/java/io/nexusrpc/handler/HandlerException.java b/nexus-sdk/src/main/java/io/nexusrpc/handler/HandlerException.java index 5cd0851..c204a0e 100644 --- a/nexus-sdk/src/main/java/io/nexusrpc/handler/HandlerException.java +++ b/nexus-sdk/src/main/java/io/nexusrpc/handler/HandlerException.java @@ -95,9 +95,11 @@ public boolean isRetryable() { case UNAUTHENTICATED: case UNAUTHORIZED: case NOT_FOUND: + case CONFLICT: case NOT_IMPLEMENTED: return false; case RESOURCE_EXHAUSTED: + case REQUEST_TIMEOUT: case INTERNAL: case UNAVAILABLE: case UPSTREAM_TIMEOUT: @@ -131,6 +133,18 @@ public enum ErrorType { * not retry this request unless advised otherwise. */ NOT_FOUND, + /** + * The request could not be made due to a conflict. This may happen when trying to create an + * operation that has already been started. Clients should not retry this request unless advised + * otherwise. + */ + CONFLICT, + /** + * Returned by the server when it has given up handling a request. This may occur by enforcing a + * client provided {@code Request-Timeout} or for any arbitrary reason such as enforcing some + * configurable limit. Subsequent requests by the client are permissible. + */ + REQUEST_TIMEOUT /** * Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system * is out of space. Subsequent requests by the client are permissible. From 67a0301ed646c0de8a710bb7caca0c32f9345a15 Mon Sep 17 00:00:00 2001 From: James Watkins-Harvey Date: Fri, 17 Oct 2025 12:13:54 -0400 Subject: [PATCH 2/2] fix missing comma --- .../src/main/java/io/nexusrpc/handler/HandlerException.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nexus-sdk/src/main/java/io/nexusrpc/handler/HandlerException.java b/nexus-sdk/src/main/java/io/nexusrpc/handler/HandlerException.java index c204a0e..2946914 100644 --- a/nexus-sdk/src/main/java/io/nexusrpc/handler/HandlerException.java +++ b/nexus-sdk/src/main/java/io/nexusrpc/handler/HandlerException.java @@ -144,7 +144,7 @@ public enum ErrorType { * client provided {@code Request-Timeout} or for any arbitrary reason such as enforcing some * configurable limit. Subsequent requests by the client are permissible. */ - REQUEST_TIMEOUT + REQUEST_TIMEOUT, /** * Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system * is out of space. Subsequent requests by the client are permissible.