Skip to content

Commit 9d0434e

Browse files
committed
rpc/rpcstatus: add status codes for DeleteObjects
This change introduces RPC status codes representing the various reasons that the DeleteObjects operation may fail: - DeleteObjectsNoItems - DeleteObjectsTooManyItems While the following new status codes are also used by DeleteObjects, they represent generic failures. New metainfo endpoints are encouraged to use them as well: - BucketNameMissing - BucketNameInvalid - ObjectKeyMissing - ObjectKeyTooLong - ObjectVersionInvalid - BucketNotFound References storj/edge#516 References storj/edge#521 Change-Id: Ia0ee491d67bddb43d5999bed466f4c9e16422d6c
1 parent 05194a5 commit 9d0434e

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

rpc/rpcstatus/status.go

+11
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ const (
4141
Unauthenticated StatusCode = 16
4242
MethodNotAllowed StatusCode = 17
4343

44+
BucketNameMissing StatusCode = 10014
45+
BucketNameInvalid StatusCode = 10015
46+
ObjectKeyMissing StatusCode = 10016
47+
ObjectKeyTooLong StatusCode = 10017
48+
ObjectVersionInvalid StatusCode = 10018
49+
50+
BucketNotFound StatusCode = 10019
51+
4452
ObjectLockEndpointsDisabled StatusCode = 10000
4553
ObjectLockDisabledForProject StatusCode = 10001
4654
ObjectLockInvalidBucketState StatusCode = 10002
@@ -56,6 +64,9 @@ const (
5664

5765
PlacementInvalidValue StatusCode = 10012
5866
PlacementConflictingValues StatusCode = 10013
67+
68+
DeleteObjectsNoItems StatusCode = 10020
69+
DeleteObjectsTooManyItems StatusCode = 10021
5970
)
6071

6172
// Code returns the status code associated with the error.

rpc/rpcstatus/statuscode_string.go

+11-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)