Skip to content

Commit 324f6dc

Browse files
authored
Merge branch 'main' into remove-handler-getinfo
2 parents d8142b1 + 1d31bdc commit 324f6dc

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/NexusRpc/Handlers/HandlerErrorType.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,19 @@ public enum HandlerErrorType
3434
/// </summary>
3535
NotFound,
3636

37+
/// <summary>
38+
/// Returned by the server to when it has given up handling a request. The may occur by enforcing a client
39+
/// provided `Request-Timeout` or for any arbitrary reason such as enforcing some configurable limit. Subsequent
40+
/// requests by the client are permissible.
41+
/// </summary>
42+
RequestTimeout,
43+
44+
/// <summary>
45+
/// The request could not be made due to a conflict. The may happen when trying to create an operation that
46+
/// has already been started. Clients should not retry this request unless advised otherwise.
47+
/// </summary>
48+
Conflict,
49+
3750
/// <summary>
3851
/// Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file
3952
/// system is out of space. Subsequent requests by the client are permissible.

src/NexusRpc/Handlers/HandlerException.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ public class HandlerException : Exception
1616
["UNAUTHENTICATED"] = HandlerErrorType.Unauthenticated,
1717
["UNAUTHORIZED"] = HandlerErrorType.Unauthorized,
1818
["NOT_FOUND"] = HandlerErrorType.NotFound,
19+
["REQUEST_TIMEOUT"] = HandlerErrorType.RequestTimeout,
20+
["CONFLICT"] = HandlerErrorType.Conflict,
1921
["RESOURCE_EXHAUSTED"] = HandlerErrorType.ResourceExhausted,
2022
["INTERNAL"] = HandlerErrorType.Internal,
2123
["NOT_IMPLEMENTED"] = HandlerErrorType.NotImplemented,
@@ -32,6 +34,7 @@ public class HandlerException : Exception
3234
HandlerErrorType.Unauthenticated,
3335
HandlerErrorType.Unauthorized,
3436
HandlerErrorType.NotFound,
37+
HandlerErrorType.Conflict,
3538
HandlerErrorType.NotImplemented,
3639
};
3740

0 commit comments

Comments
 (0)