Skip to content

Commit

Permalink
add code 'too early' (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
2403905 authored Jul 24, 2024
1 parent c6fd8f2 commit 144ab1e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion cs3/gateway/v1beta1/gateway_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ service GatewayAPI {
// then the entire directory is deleted recursively.
// If a resource specifies a reference or symlink type, only the reference is removed (not the target).
// MUST return CODE_NOT_FOUND if the reference does not exist.
// MUST return CODE_TOO_EARLY if some are not finished job over resource is still in process.
rpc Delete(cs3.storage.provider.v1beta1.DeleteRequest) returns (cs3.storage.provider.v1beta1.DeleteResponse);
// Returns the path reference for
// the provided resource id reference.
Expand Down Expand Up @@ -145,7 +146,8 @@ service GatewayAPI {
rpc ListRecycle(cs3.storage.provider.v1beta1.ListRecycleRequest) returns (cs3.storage.provider.v1beta1.ListRecycleResponse);
// Moves a resource from one reference to another.
// MUST return CODE_NOT_FOUND if any of the references do not exist.
// MUST return CODE_FAILED_PRECONDITION if the source reference
// MUST return CODE_FAILED_PRECONDITION if the source reference.
// MUST return CODE_TOO_EARLY if some are not finished job over resource is still in process.
// cannot be moved to the destination reference.
rpc Move(cs3.storage.provider.v1beta1.MoveRequest) returns (cs3.storage.provider.v1beta1.MoveResponse);
// Permanently removes a recycle item from the recycle.
Expand Down
8 changes: 6 additions & 2 deletions cs3/rpc/v1beta1/code.proto
Original file line number Diff line number Diff line change
Expand Up @@ -183,19 +183,23 @@ enum Code {
// Redirects the operation to another location.
// Used in a Status reponse with a reference to the target URI.
CODE_REDIRECTION = 18;
//
// The operation could not be performed because there is not enough
// storage available. This can be because of lack of real storage
// space or because of the exceeding of a quota associated to a
// storage.
//
// HTTP Mapping: 507 Insufficient Storage
CODE_INSUFFICIENT_STORAGE = 19;
//
// The ability to lock a resource is specific to some WebDAV servers.
// The HTTP 423 Locked error response code indicates that either
// the resources tentatively targeted by is locked, meaning it can't be accessed.
//
// HTTP Mapping: 423 Locked
CODE_LOCKED = 20;
// The server returns the response status code to indicate that it has received
// the request but is not going to process it because an asynchronous job
// that has been started is still being processed and the result can not yet be provided.
//
// HTTP Mapping: 425 Too Early
CODE_TOO_EARLY = 21;
}

0 comments on commit 144ab1e

Please sign in to comment.